* {
  box-sizing: border-box;
}

:root {
  --orange: #ff6817;
  --orange-dark: #df5208;
  --teal: #087d7d;
  --teal-dark: #075f60;
  --teal-soft: #e8fbfa;
  --ink: #11181c;
  --muted: #5b666d;
  --line: #dfe9e8;
  --bg: #f5faf9;
  --warn: #fff4e8;
  --danger: #a64205;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff7ef 0, #f6fbfa 360px, #f8fbfb 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.phone-shell {
  width: min(548px, calc(100% - 8px));
  margin: 0 auto;
  padding: 12px 0 36px;
}

.admin-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px 18px 42px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 16px;
  font-weight: 900;
}

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-size: 24px;
  font-weight: 900;
}

.page-title {
  margin: 12px 0 0;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.page-title span {
  color: var(--teal);
}

.phone-shell .topbar {
  margin-bottom: 10px;
  padding: 20px 18px 29px;
  border: 1px solid #eadfd5;
  border-radius: 8px;
  background: linear-gradient(116deg, #fff 0, #fff8f0 56%, #eefaf8 100%);
  box-shadow: none;
}

.phone-shell .topbar > div {
  min-width: 0;
  width: 100%;
}

.phone-shell .brand {
  font-size: 14px;
}

.phone-shell .mark {
  width: 34px;
  height: 34px;
  font-size: 21px;
  box-shadow: none;
}

.phone-shell .page-title {
  margin-top: 24px;
  max-width: 430px;
  font-size: 43px;
  line-height: 1.02;
}

.phone-shell .topbar p {
  max-width: 510px;
  margin: 5px 0 0;
  color: #33454d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.phone-shell .panel {
  border-color: #d8e6e4;
  box-shadow: none;
}

.panel-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.phone-shell .panel-head {
  padding: 15px 16px 17px;
  background: #fff;
}

.phone-shell .panel-head h2 {
  display: block;
  font-size: 18px;
}

.phone-shell .panel-head h2::before {
  content: none;
}

.phone-shell .panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-form {
  display: grid;
  gap: 22px;
  padding: 18px;
}

.phone-shell .profile-form {
  gap: 0;
  padding: 16px;
}

.group {
  display: grid;
  gap: 12px;
}

.phone-shell .group {
  gap: 8px;
  padding: 0;
  margin-bottom: 18px;
  border-bottom: 0;
}

.phone-shell .group:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 900;
}

.phone-shell .group-title {
  font-size: 14px;
}

.num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.phone-shell .num {
  width: 24px;
  height: 24px;
  background: var(--orange);
  font-size: 13px;
}

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

.phone-shell .grid {
  gap: 10px;
}

label {
  display: grid;
  gap: 8px;
  color: #29343a;
  font-size: 14px;
  font-weight: 850;
}

.phone-shell label {
  gap: 4px;
  font-size: 12px;
  line-height: 1.2;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d5e2e1;
  border-radius: 8px;
  background: #fbfdfd;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.phone-shell input,
.phone-shell select,
.phone-shell textarea {
  min-height: 35px;
  border-color: #d7e4e2;
  background: #fff;
  padding: 7px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 125, 125, .12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phone-shell .chips {
  gap: 8px 9px;
}

.chip {
  position: relative;
  display: block;
}

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.chip span {
  display: block;
  min-width: 88px;
  padding: 10px 14px;
  border: 1px solid #d5e2e1;
  border-radius: 999px;
  background: #fbfdfd;
  color: #263238;
  text-align: center;
  font-weight: 850;
}

.phone-shell .chip span {
  min-width: 73px;
  padding: 8px 14px;
  border-color: #d7e4e2;
  border-radius: 999px;
  background: #fff;
  color: #203036;
  font-size: 12px;
}

.chip input:checked + span {
  color: var(--teal-dark);
  border-color: #9fdad8;
  background: var(--teal-soft);
}

.phone-shell .chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(8, 125, 125, .14);
}

.phone-shell .chip input:checked + span {
  color: #fff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.note {
  display: none;
  padding: 12px;
  border: 1px solid #ffd9b5;
  border-radius: 8px;
  color: var(--danger);
  background: var(--warn);
  font-size: 14px;
  font-weight: 800;
}

.note.show {
  display: block;
}

.success {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bce8e6;
  border-radius: 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 900;
  text-align: center;
}

.success.show {
  display: block;
}

.phone-shell .success {
  box-shadow: 0 12px 28px rgba(8, 125, 125, .1);
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
  text-decoration: none;
}

.btn:hover {
  background: var(--orange-dark);
}

.btn.secondary {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.btn.secondary:hover {
  background: #d4f2f1;
}

.btn.ghost {
  color: #4c585e;
  background: #eef4f3;
}

.btn.ghost:hover {
  background: #e2ebea;
}

.btn.full {
  width: 100%;
}

.phone-shell .btn.full {
  min-height: 42px;
  margin-top: 4px;
  font-size: 15px;
  box-shadow: 0 12px 24px rgba(255, 104, 23, .22);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .68;
}

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

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

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

.stat {
  padding: 14px;
  border: 1px solid #ffdfbe;
  border-radius: 8px;
  background: var(--warn);
}

.stat b {
  display: block;
  color: var(--orange-dark);
  font-size: 28px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: #5d6266;
  font-size: 13px;
  font-weight: 850;
}

.summary {
  min-height: 142px;
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
  color: #263238;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.table-wrap {
  margin: 0 16px 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #f3faf9;
  color: var(--teal-dark);
  font-weight: 900;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 30px;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%) translateY(16px);
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 28, .92);
  font-size: 14px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 760px) {
  .admin-shell {
    padding: 0 0 34px;
  }

  .admin-shell .topbar {
    padding: 18px 14px 14px;
  }

  .admin-shell .panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .topbar {
    flex-direction: column;
  }

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

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

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

@media (max-width: 480px) {
  .phone-shell {
    padding: 0 0 32px;
  }

  .phone-shell .topbar {
    margin-bottom: 8px;
    padding: 22px 20px 26px;
    border-right: 0;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
  }

  .phone-shell .panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .page-title {
    font-size: 32px;
  }

  .phone-shell .page-title {
    margin-top: 26px;
    font-size: 34px;
    line-height: 1.05;
  }

  .phone-shell .topbar p {
    font-size: 13px;
    line-height: 1.7;
    word-break: break-all;
  }

  .phone-shell .panel-head,
  .phone-shell .profile-form {
    padding: 18px 14px;
  }

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

  .phone-shell .chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .phone-shell .chip span {
    width: 100%;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
  }
}
