:root {
  --bg: #f2f2f2;
  --ink: #050505;
  --muted: #7d7d7d;
  --line: #ececec;
  --brand: #fcd53b;
  --green: #43ac8f;
  --panel: #ffffff;
  --shadow: 0 18px 48px rgba(24, 26, 32, 0.10);
  --canvas-w: 1152;
  --canvas-h: 2376;
  --scale: min(calc((100vw - 24px - 360px - 24px) / 1152), calc((100vh - 26px) / 2376));
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input {
  width: 100%;
  outline: none;
}

h1,
p {
  margin: 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1280px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 14px 0 22px;
}

.preview-area {
  display: grid;
  place-items: start center;
}

.phone-shell {
  width: calc(1152px * var(--scale));
  height: calc(2376px * var(--scale));
  overflow: hidden;
}

.phone-screen {
  position: relative;
  width: 1152px;
  height: 2376px;
  overflow: hidden;
  background: #fff;
  color: #000;
  box-shadow: var(--shadow);
  transform: scale(var(--scale));
  transform-origin: left top;
}

.sim-badge {
  position: absolute;
  top: 260px;
  right: 44px;
  z-index: 6;
  padding: 4px 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #9aa0a6;
  font-size: 18px;
  font-weight: 700;
}

.status-bar,
.top-tabs,
.asset-summary,
.account-section,
.bottom-tabs {
  position: relative;
  z-index: 2;
}

.status-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 118px;
  padding: 0 45px;
  color: #383b3f;
}

.status-bar strong {
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.silent-icon {
  position: relative;
  width: 24px;
  height: 24px;
  border-left: 8px solid #4f5258;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.silent-icon::after {
  content: "";
  position: absolute;
  left: -9px;
  top: 9px;
  width: 30px;
  height: 4px;
  background: #4f5258;
  transform: rotate(46deg);
}

.speed-stack {
  display: grid;
  gap: 0;
  color: #4f5258;
  font-size: 20px;
  line-height: 1;
}

.signal-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 31px;
}

.signal-icon i {
  display: block;
  width: 6px;
  border-radius: 2px;
  background: #4f5258;
}

.signal-icon i:nth-child(1) { height: 10px; }
.signal-icon i:nth-child(2) { height: 17px; }
.signal-icon i:nth-child(3) { height: 24px; }
.signal-icon i:nth-child(4) { height: 31px; }

.battery-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 38px;
  border: 3px solid #4f5258;
  border-radius: 11px;
  color: #35383d;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -8px;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #4f5258;
}

.top-tabs {
  display: flex;
  align-items: center;
  gap: 48px;
  height: 132px;
  padding: 18px 45px 0;
  border-bottom: 1px solid var(--line);
  color: #73777d;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  width: 100%;
}

.top-tabs .active {
  color: #000;
}

.asset-summary {
  padding: 44px 45px 46px;
  border-bottom: 1px solid var(--line);
}

.asset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.asset-head > div {
  display: inline-flex;
  align-items: center;
  gap: 24px;
}

.section-label {
  font-size: 39px;
  line-height: 1;
}

.eye-icon {
  position: relative;
  width: 38px;
  height: 24px;
  border: 4px solid #b0b4b8;
  border-radius: 50% / 58%;
}

.eye-icon::after {
  content: "";
  position: absolute;
  inset: 5px 11px;
  border-radius: 50%;
  background: #b0b4b8;
}

.summary-icons {
  display: inline-flex;
  gap: 64px;
  margin-top: 2px;
  margin-right: 10px;
}

.chart-icon {
  position: relative;
  width: 55px;
  height: 55px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'%3E%3Cpath d='M8 4v43h43' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 36l14-14 10 10 10-12' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 55px 55px no-repeat;
}

.chart-icon::after {
  content: none;
}

.history-icon {
  position: relative;
  width: 55px;
  height: 55px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'%3E%3Cpath d='M9 7h33a4 4 0 0 1 4 4v31H13a4 4 0 0 1-4-4V11a4 4 0 0 1 4-4z' fill='none' stroke='%23000' stroke-width='5' stroke-linejoin='round'/%3E%3Ccircle cx='45' cy='45' r='10' fill='%23fff' stroke='%23000' stroke-width='5'/%3E%3Cpath d='M45 38v7l5 3' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 55px 55px no-repeat;
}

.history-icon::after {
  content: none;
}

.history-icon::before {
  content: none;
}

.total-line {
  display: flex;
  align-items: flex-end;
  gap: 15px;
  margin-top: 52px;
}

.total-line strong {
  font-size: 82px;
  font-weight: 700;
  line-height: 0.92;
}

.total-line span {
  margin-bottom: 5px;
  font-size: 34px;
  font-weight: 700;
}

.unit-text {
  font-weight: 400;
}

.total-line i {
  width: 0;
  height: 0;
  margin-bottom: 18px;
  border-top: 8px solid #000;
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
}

.cny-line {
  margin-top: 46px;
  color: #7c8085;
  font-size: 36px;
  line-height: 1;
}

.pnl-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  font-size: 39px;
  line-height: 1;
}

.pnl-line span {
  color: #000;
}

.pnl-line strong {
  color: var(--green);
  font-size: 35px;
  font-weight: 500;
}

.pnl-line i {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-top: 4px solid #a6aaae;
  border-right: 4px solid #a6aaae;
  transform: rotate(45deg);
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
}

.action-row button {
  height: 104px;
  border-radius: 13px;
  background: #ebedf0;
  color: #111;
  font-size: 37px;
  font-weight: 500;
}

.action-row .yellow {
  background: var(--brand);
}

.account-section {
  padding-top: 44px;
}

.account-tabs {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 78px;
  padding: 0 45px;
  color: #7b7f84;
  font-size: 38px;
  font-weight: 700;
}

.account-tabs .active {
  position: relative;
  color: #000;
}

.account-tabs .active::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -34px;
  width: 45px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
}

.account-tabs .account-tabs-icon {
  position: absolute;
  top: 0;
  right: 45px;
  display: block;
  width: 72px;
  height: 72px;
  background: url("/assets/account-tabs-icon-reference.png") center / 72px 72px no-repeat;
}

.account-list {
  padding: 72px 45px 190px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  grid-template-rows: auto auto;
  align-items: start;
  align-content: start;
  min-height: 190px;
  column-gap: 10px;
  row-gap: 38px;
}

.account-row > span {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: #000;
  font-size: 39px;
  font-weight: 700;
}

.account-row strong {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  color: #000;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.12;
  white-space: nowrap;
}

.account-row small {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  margin-top: 0;
  color: #7d8187;
  font-size: 32px;
  line-height: 1;
  white-space: nowrap;
}

.bottom-tabs {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 220px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.bottom-tabs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.control-panel {
  align-self: start;
  position: sticky;
  top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-title span {
  color: #8a6500;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.panel-title h1 {
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.1;
}

.settings-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  color: #474d57;
  font-size: 13px;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: #626973;
  font-size: 12px;
  font-weight: 800;
}

label span {
  min-width: 0;
}

input {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  background: #fbfcfd;
  color: #181a20;
}

input:focus {
  border-color: #d6a800;
  box-shadow: 0 0 0 3px rgba(252, 213, 53, 0.22);
}

.check-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.check-row input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--brand);
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.panel-actions button {
  min-height: 44px;
  border-radius: 6px;
  background: #edeff3;
  color: #181a20;
  font-weight: 800;
}

.panel-actions .primary {
  background: var(--brand);
}

.export-status {
  margin: -6px 0 0;
  color: #5f6670;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.export-status a {
  color: #8a6500;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
    width: min(100vw - 16px, 980px);
  }

  .phone-shell {
    width: 100%;
    height: auto;
    aspect-ratio: 1152 / 2376;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .workspace {
    width: 100vw;
    gap: 12px;
    padding: 0;
  }

  fieldset {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    grid-template-columns: 1fr;
  }
}
