:root {
  --blue: #0b63f6;
  --blue-2: #0f7cf7;
  --red: #e60012;
  --ink: #12213f;
  --muted: #6b7894;
  --line: #dfe7f4;
  --soft: #f5f8fd;
  --panel: #ffffff;
  --green: #10a66a;
  --orange: #f58a1f;
  --shadow: 0 14px 42px rgba(17, 42, 92, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(11, 99, 246, 0.11), transparent 34rem),
    linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

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

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(11, 99, 246, 0.08) 18.2% 18.7%, transparent 18.9% 100%),
    repeating-linear-gradient(90deg, rgba(11, 99, 246, 0.055) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(11, 99, 246, 0.045) 0 1px, transparent 1px 96px),
    linear-gradient(135deg, rgba(230, 0, 18, 0.07), transparent 24rem),
    linear-gradient(145deg, #eef6ff 0%, #ffffff 48%, #f5f8fd 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-page::before {
  left: 7vw;
  bottom: 12vh;
  width: 38vw;
  height: 28vh;
  border-left: 1px solid rgba(11, 99, 246, 0.22);
  border-bottom: 1px solid rgba(11, 99, 246, 0.18);
  transform: skewX(-18deg);
}

.login-page::after {
  right: 9vw;
  top: 13vh;
  width: 18vw;
  height: 18vw;
  border: 1px solid rgba(11, 99, 246, 0.13);
  transform: rotate(45deg);
}

.login-brand {
  position: relative;
  z-index: 1;
  padding: 72px 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-row,
.top-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0;
}

.telecom-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #1ba3ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(11, 99, 246, 0.28);
}

.login-brand h1 {
  margin: 42px 0 18px;
  font-size: 46px;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 44px;
  max-width: 620px;
}

.login-metrics span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.login-metrics strong {
  font-size: 28px;
}

.login-card {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(440px, calc(100% - 32px));
  padding: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(214, 225, 242, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.login-card .hint {
  margin: 0 0 28px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: #40506f;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d7e1f0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border 0.18s, box-shadow 0.18s;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 99, 246, 0.11);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.text-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 10px 22px rgba(11, 99, 246, 0.18);
}

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

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

.text-btn {
  color: var(--blue);
  background: transparent;
  padding-inline: 8px;
}

.login-card .primary-btn {
  width: 100%;
  margin-top: 8px;
}

.error {
  color: var(--red);
  min-height: 20px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.top-brand {
  min-width: 238px;
  color: var(--ink);
}

.top-brand .telecom-mark {
  width: 34px;
  height: 34px;
}

.nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 8px;
}

.nav button {
  border: 0;
  background: transparent;
  color: #40506f;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  font-weight: 800;
}

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

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

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #55b6ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.workspace {
  padding: 18px 22px 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-head {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(11, 99, 246, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(20, 50, 90, 0.04);
}

.section-subtitle {
  margin: 6px 0 0 14px;
  color: var(--muted);
}

.title-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-mark::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--blue);
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.date-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar select,
.toolbar input {
  width: auto;
  min-width: 138px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.kpi-card,
.rank-panel,
.table-panel,
.form-panel,
.account-panel,
.detail-page {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 50, 90, 0.05);
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 14px;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #2ca8ff);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.kpi-card:nth-child(3) .kpi-icon {
  background: linear-gradient(135deg, #04b99c, #37d5b4);
}

.kpi-card:nth-child(4) .kpi-icon {
  background: linear-gradient(135deg, #ff7a18, #ffae34);
}

.kpi-card:nth-child(5) .kpi-icon {
  background: linear-gradient(135deg, #7b5cff, #9b7cff);
}

.kpi-label {
  color: var(--muted);
  font-weight: 700;
}

.kpi-value {
  margin-top: 4px;
  font-size: 23px;
  font-weight: 900;
}

.trend {
  margin-top: 5px;
  color: var(--red);
  font-size: 12px;
}

.dashboard-main {
  display: grid;
  gap: 12px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.rank-panel {
  padding: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.rank-row,
.table-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  border-bottom: 1px solid #edf2f8;
}

.rank-row {
  grid-template-columns: 44px 1fr 120px;
}

.rank-row:last-child,
.table-row:last-child {
  border-bottom: 0;
}

.rank-row.header,
.table-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.medal {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #edf3fb;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.medal.top {
  color: #fff;
  background: linear-gradient(135deg, #ffb020, #f58a1f);
}

.bar-track {
  height: 5px;
  border-radius: 6px;
  background: #edf2f8;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--blue), #1ba3ff);
}

.table-panel {
  overflow: hidden;
}

.table-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  flex-wrap: wrap;
}

.table-tabs button {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #40506f;
  padding: 0 12px;
  font-weight: 800;
}

.table-tabs button.active {
  color: var(--blue);
  border-color: #cfe0ff;
  background: #edf5ff;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}

.op-table {
  min-width: 980px;
}

.table-scroll {
  overflow: auto;
}

.table-row {
  grid-template-columns: 1.25fr 0.75fr 1.15fr 0.8fr 1fr 0.8fr 0.75fr 0.9fr 0.9fr;
  padding: 0 16px;
}

.status {
  display: inline-flex;
  justify-content: center;
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.status.following {
  color: var(--blue);
  background: #eaf3ff;
}

.status.success {
  color: var(--green);
  background: #e7f8ef;
}

.status.failed {
  color: var(--red);
  background: #fff0f1;
}

.management-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-panel,
.account-panel {
  padding: 20px;
}

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

.form-grid .span-2 {
  grid-column: span 2;
}

.detail-page {
  padding: 22px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.detail-head h2 {
  margin-top: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.action-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}

.action-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.action-panel h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.action-panel .field {
  margin-bottom: 12px;
}

.action-panel textarea {
  min-height: 76px;
}

.action-switch button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 8px;
  font-weight: 900;
  color: #40506f;
}

.action-switch button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.timeline {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 12px;
}

.timeline-item strong {
  display: block;
}

.timeline-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

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

.accounts-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr 100px 120px 120px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.table-op-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-text {
  color: var(--red);
}

.pill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: #40506f;
  background: #edf3fb;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .rank-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .topbar {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px 0;
  }

  .nav {
    overflow-x: auto;
  }

  .userbox {
    position: absolute;
    right: 16px;
    top: 14px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 13px;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 38px 22px 12px;
  }

  .login-brand h1 {
    font-size: 32px;
    margin-top: 28px;
  }

  .login-metrics {
    grid-template-columns: 1fr;
  }

  .login-card {
    margin: 20px 0 36px;
    padding: 24px;
  }

  .workspace {
    padding: 10px 10px 18px;
  }

  .section-head,
  .table-top {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-head {
    padding: 12px;
    gap: 10px;
  }

  .section-subtitle {
    margin-left: 14px;
    font-size: 12px;
  }

  .date-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .toolbar select,
  .toolbar input,
  .toolbar .primary-btn,
  .toolbar .ghost-btn,
  .table-actions,
  .table-actions button,
  .table-actions input,
  .table-actions select {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kpi-card {
    min-height: 78px;
    padding: 10px;
    gap: 8px;
  }

  .kpi-icon {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .kpi-label {
    font-size: 12px;
  }

  .kpi-value {
    font-size: 19px;
  }

  .rank-row {
    grid-template-columns: 34px 1fr 96px;
    gap: 8px;
  }

  .rank-panel {
    padding: 10px;
  }

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

  .table-tabs {
    padding: 8px 0;
  }

  .table-actions {
    padding-bottom: 8px;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .detail-page {
    padding: 18px;
  }

  .detail-head {
    flex-direction: column;
    gap: 12px;
  }

  .detail-head .danger-btn {
    width: 100%;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .action-switch {
    grid-template-columns: 1fr;
  }

  .account-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }
}
