:root {
  --bg: #030712;
  --bg-soft: #071227;
  --glass: rgba(8, 20, 46, 0.7);
  --glass-strong: rgba(10, 29, 65, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.055);
  --ink: #f6fbff;
  --muted: #9fb2d3;
  --line: rgba(139, 185, 255, 0.2);
  --line-strong: rgba(169, 210, 255, 0.42);
  --blue: #1f68df;
  --cyan: #58a6ff;
  --cyan-rgb: 88, 166, 255;
  --violet: #6f7cff;
  --pink: #ff7fd0;
  --danger: #ff8a92;
  --shadow: none;
  --glow: none;
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 6px;
}

* {
  box-sizing: border-box;
}

@property --flow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes borderFlow {
  to {
    --flow-angle: 360deg;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(ellipse at 50% -8%, rgba(30, 94, 202, 0.46), transparent 34%),
    radial-gradient(ellipse at 0% 0%, rgba(33, 118, 224, 0.22), transparent 28%),
    linear-gradient(180deg, #07142d 0%, #040a17 34%, #02050d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 72%);
}

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

button {
  color: inherit;
}

.page-shell {
  position: relative;
  width: min(1240px, calc(100vw - 32px));
  margin: 28px auto 40px;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 88px 8% auto;
  height: 180px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(83, 154, 255, 0.34), transparent 64%);
  filter: blur(34px);
  opacity: 0.24;
}

.panel,
.metric-card,
.business-item,
.record-toolbar {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025)),
    var(--glass);
  box-shadow: none;
  backdrop-filter: blur(24px) saturate(130%);
}

.panel::before,
.metric-card::before,
.business-item::before,
.record-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--flow-angle, 0deg), transparent 0deg, transparent 58deg, rgba(var(--cyan-rgb), 0.72) 76deg, rgba(255, 255, 255, 0.42) 92deg, rgba(31, 104, 223, 0.38) 110deg, transparent 128deg, transparent 360deg);
  opacity: 0;
  transition: opacity 420ms ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.panel:hover::before,
.metric-card:hover::before,
.business-item:hover::before,
.record-toolbar:hover::before {
  animation: borderFlow 2.4s linear infinite;
  opacity: 1;
}

.panel > *,
.metric-card > *,
.business-item > *,
.record-toolbar > * {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  min-height: 360px;
  gap: 36px;
  overflow: hidden;
  padding: 44px 20px 48px;
  border-bottom: 1px solid rgba(139, 185, 255, 0.12);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.52), transparent);
  opacity: 0.7;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.hero h1,
.panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 750;
  letter-spacing: 0;
  text-shadow: none;
}

.hero h1 {
  max-width: 760px;
  font-size: 46px;
  line-height: 1.12;
}

.hero-text {
  margin: 16px 0 0;
  max-width: 720px;
  line-height: 1.75;
  color: #c8d7f4;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-meta span,
.mini-note,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(139, 185, 255, 0.18);
  border-radius: 999px;
  background: rgba(79, 141, 255, 0.1);
  color: #cfe5ff;
  font-size: 13px;
  box-shadow: none;
}

.hero-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: #d7e5ff;
  font-size: 14px;
}

.hero-rules li {
  position: relative;
  padding-left: 14px;
}

.hero-rules li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.hero-visual {
  position: relative;
  min-height: 290px;
  overflow: hidden;
}

.horizon {
  position: absolute;
  right: 2%;
  bottom: 38px;
  width: 94%;
  height: 135px;
  border-top: 1px solid rgba(150, 213, 255, 0.78);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240, 248, 255, 0.72), rgba(var(--cyan-rgb), 0.16) 18%, transparent 44%);
  opacity: 0.86;
}

.core-light {
  position: absolute;
  right: 32%;
  bottom: 148px;
  width: 92px;
  height: 3px;
  border-radius: 999px;
  background: rgba(245, 252, 255, 0.88);
  filter: blur(3px);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(143, 193, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.orbit-one {
  right: 4%;
  bottom: 42px;
  width: 430px;
  height: 180px;
}

.orbit-two {
  right: 14%;
  bottom: 76px;
  width: 300px;
  height: 126px;
}

.orbit-three {
  right: 27%;
  bottom: 100px;
  width: 170px;
  height: 72px;
  border-style: dashed;
}

.data-node {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

.node-one {
  right: 17%;
  bottom: 175px;
}

.node-two {
  right: 45%;
  bottom: 126px;
}

.node-three {
  right: 34%;
  bottom: 214px;
}

.layout {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  font-size: 28px;
}

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

.entry-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-form span {
  color: #d9e7ff;
  font-size: 14px;
  font-weight: 700;
}

.entry-form em {
  margin-left: 6px;
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.entry-form input,
.entry-form textarea,
.record-toolbar select {
  width: 100%;
  border: 1px solid rgba(139, 185, 255, 0.18);
  background: #091226;
  color: var(--ink);
  box-shadow: none;
}

.entry-form input,
.entry-form textarea {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  resize: vertical;
}

.entry-form input::placeholder,
.entry-form textarea::placeholder {
  color: rgba(193, 211, 243, 0.54);
}

.entry-form input:hover,
.entry-form textarea:hover,
.record-toolbar select:hover {
  border-color: rgba(var(--cyan-rgb), 0.44);
  box-shadow: none;
}

.entry-form input:focus,
.entry-form textarea:focus,
.record-toolbar select:focus {
  outline: 2px solid rgba(var(--cyan-rgb), 0.2);
  border-color: rgba(var(--cyan-rgb), 0.66);
}

.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  text-align: center;
}

.primary-button,
.ghost-button,
.secondary-button,
.edit-button,
.delete-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(169, 210, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.primary-button::before,
.ghost-button::before,
.secondary-button::before,
.edit-button::before,
.delete-button::before {
  content: none;
}

.primary-button:hover,
.ghost-button:hover,
.secondary-button:hover,
.edit-button:hover,
.delete-button:hover {
  border-color: rgba(var(--cyan-rgb), 0.62);
  box-shadow: none;
}

.primary-button:hover::before,
.ghost-button:hover::before,
.secondary-button:hover::before,
.edit-button:hover::before,
.delete-button:hover::before {
  content: none;
}

.primary-button {
  min-width: 260px;
  padding: 14px 34px;
  background: linear-gradient(135deg, #eef6ff, var(--cyan) 42%, #1f68df 100%);
  color: #061229;
  font-weight: 800;
}

.ghost-button,
.secondary-button,
.edit-button {
  padding: 10px 16px;
  background: rgba(79, 141, 255, 0.1);
  color: #dbeaff;
  font-weight: 700;
}

.delete-button {
  padding: 9px 12px;
  background: rgba(255, 138, 146, 0.1);
  color: #ffd4d8;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

.form-message,
.entry-hint,
.muted {
  color: var(--muted);
}

.form-message {
  margin: 0;
  font-size: 14px;
}

.entry-hint {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.is-hidden {
  display: none;
}

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

.metric-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 220ms ease;
}

.metric-card:hover {
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: none;
}

.metric-card p,
.metric-card span {
  margin: 0;
}

.metric-card p {
  color: #b7c9ee;
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin: 12px 0 8px;
  color: #ffffff;
  font-size: 40px;
  line-height: 1;
  text-shadow: none;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.accent-card {
  background:
    linear-gradient(145deg, rgba(var(--cyan-rgb), 0.14), rgba(31, 104, 223, 0.1)),
    rgba(9, 28, 70, 0.76);
  border-color: rgba(var(--cyan-rgb), 0.38);
}

.monthly-chart {
  display: grid;
  gap: 14px;
}

.month-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
}

.month-label,
.month-meta {
  font-size: 14px;
}

.month-label {
  color: #e5f4ff;
  font-weight: 800;
}

.month-bar {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(139, 185, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.month-bar::before,
.month-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.month-bar::before {
  width: var(--theory-width);
  background: rgba(79, 141, 255, 0.22);
}

.month-bar::after {
  width: var(--actual-width);
  background: linear-gradient(90deg, #ffffff, var(--cyan) 30%, var(--blue) 72%, var(--violet));
  box-shadow: none;
}

.month-row:hover .month-bar::after {
  filter: brightness(1.22);
}

.month-meta {
  text-align: right;
  color: var(--muted);
}

.business-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.donut-wrap {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.business-donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--blue) 0 100%);
  position: relative;
}

.business-donut::after {
  content: "";
  position: absolute;
  inset: 22%;
  border: 1px solid rgba(139, 185, 255, 0.2);
  border-radius: 50%;
  background: rgba(3, 11, 29, 0.78);
  box-shadow: none;
}

.donut-center {
  position: absolute;
  inset: 34% 22%;
  display: grid;
  z-index: 1;
  place-items: center;
  text-align: center;
}

.donut-center strong {
  color: #ffffff;
  font-size: 28px;
  text-shadow: none;
}

.donut-center span {
  color: var(--muted);
  font-size: 13px;
}

.business-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 340px;
  overflow: auto;
  padding-right: 6px;
}

.business-list::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.business-list::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.28);
}

.business-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.business-item header,
.business-item footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.business-item header strong {
  color: #f5fbff;
  font-size: 14px;
  line-height: 1.4;
}

.business-item footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.business-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.business-track span {
  display: block;
  width: var(--ratio-width);
  height: 100%;
  border-radius: inherit;
  background: var(--business-color);
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
}

.records-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.record-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin: 2px 0 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
}

.record-toolbar label {
  display: grid;
  gap: 8px;
  min-width: min(240px, 100%);
}

.record-toolbar span {
  color: #c9d9f5;
  font-size: 13px;
  font-weight: 800;
}

.record-toolbar select {
  min-height: 42px;
  padding: 0 40px 0 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.record-toolbar option {
  color: #07142b;
}

.record-toolbar p {
  margin: 0;
  color: #e3f5ff;
  font-size: 15px;
  font-weight: 800;
}

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

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 185, 255, 0.12);
  vertical-align: top;
}

th {
  color: #aebfe0;
  font-size: 13px;
  font-weight: 800;
}

td {
  color: #dceaff;
  font-size: 14px;
  line-height: 1.6;
}

tbody tr {
  transition: background 180ms ease;
}

tbody tr:hover {
  background: linear-gradient(90deg, rgba(var(--cyan-rgb), 0.1), rgba(43, 124, 255, 0.05), transparent);
  box-shadow: none;
}

.record-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.record-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  margin-top: 4px;
  padding: 8px 18px;
  border: 1px solid rgba(var(--cyan-rgb), 0.46);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.18), rgba(31, 104, 223, 0.28));
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.record-link:hover {
  border-color: rgba(var(--cyan-rgb), 0.82);
  background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.28), rgba(31, 104, 223, 0.38));
  text-decoration: none;
  text-shadow: none;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid rgba(var(--cyan-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.1);
  color: #dff8ff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.record-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

@media (max-width: 980px) {
  .entry-form {
    grid-template-columns: 1fr;
  }

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

  .panel-heading,
  .form-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .month-meta {
    text-align: left;
  }

  .business-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    margin: 10px auto 28px;
  }

  .hero,
  .panel,
  .metric-card {
    padding: 18px;
    border-radius: var(--radius-xl);
  }

  .hero h1 {
    font-size: 30px;
  }

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

  .panel-heading h2 {
    font-size: 24px;
  }

  .records-meta {
    justify-content: flex-start;
  }
}
