:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #eef6f4;
  --ink: #18252d;
  --muted: #667085;
  --line: #dce4df;
  --brand: #174f60;
  --brand-deep: #123947;
  --blue: #266da8;
  --amber: #b86b00;
  --green: #067647;
  --red: #b42318;
  --shadow: 0 10px 26px rgba(24, 42, 49, 0.08);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(23, 79, 96, 0.1), transparent 220px),
    var(--bg);
}

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

button {
  border: 0;
}

#app {
  min-height: 100vh;
}

.phone,
.login {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(31, 75, 95, 0.08);
}

.login {
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.brand-mark {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
  box-shadow: var(--shadow);
}

.login h1 {
  margin: 16px 0 8px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.panel,
.card,
.login-form,
.sheet,
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-form {
  padding: 16px;
  display: grid;
  gap: 13px;
}

.topbar {
  min-height: 82px;
  padding: max(14px, env(safe-area-inset-top)) 14px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
    var(--brand-deep);
}

.eyebrow {
  font-size: 12px;
  opacity: 0.78;
}

.title {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 850;
}

.content {
  padding: 14px 12px 132px;
  display: grid;
  gap: 12px;
}

.panel,
.card {
  padding: 14px;
}

.head,
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.head {
  margin-bottom: 11px;
}

.head h2,
.head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

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

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

.input {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.input input,
.input textarea,
.input select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.input textarea {
  min-height: 86px;
  padding: 11px 0;
  resize: vertical;
}

.primary,
.secondary,
.ghost,
.icon-btn,
.tab,
.seg,
.status-btn {
  min-height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease;
}

.primary:active,
.secondary:active,
.ghost:active,
.icon-btn:active,
.tab:active,
.seg:active,
.status-btn:active {
  transform: translateY(1px);
}

.primary {
  color: #fff;
  background: var(--brand);
  padding: 0 15px;
  font-weight: 800;
}

.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary {
  color: var(--brand);
  background: var(--surface-2);
  border: 1px solid #c3d4d7;
  padding: 0 13px;
  font-weight: 800;
}

.ghost {
  color: var(--ink);
  background: transparent;
  padding: 0 9px;
}

.ghost.light {
  color: #fff;
}

.icon-btn {
  width: 42px;
  color: var(--ink);
  background: #eef1ef;
}

.topbar .icon-btn {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.92);
}

.hero {
  min-height: 132px;
  border-radius: 8px;
  overflow: hidden;
  padding: 15px;
  display: grid;
  align-content: end;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(20, 38, 48, 0.94), rgba(31, 75, 95, 0.55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='280' viewBox='0 0 760 280'%3E%3Crect width='760' height='280' fill='%23d7dfdd'/%3E%3Cpath d='M0 226h760v54H0z' fill='%2398a9a4'/%3E%3Cg fill='%23214c63'%3E%3Crect x='95' y='116' width='250' height='84' rx='10'/%3E%3Crect x='345' y='140' width='150' height='60' rx='8'/%3E%3C/g%3E%3Cg fill='%23f7f1e4' stroke='%2399a49f' stroke-width='3'%3E%3Crect x='132' y='80' width='92' height='72' rx='6'/%3E%3Crect x='238' y='86' width='70' height='66' rx='6'/%3E%3C/g%3E%3Cg fill='%23b17b2a'%3E%3Ccircle cx='150' cy='214' r='18'/%3E%3Ccircle cx='302' cy='214' r='18'/%3E%3Ccircle cx='392' cy='214' r='18'/%3E%3Ccircle cx='470' cy='214' r='18'/%3E%3C/g%3E%3Cpath d='M545 96l44 48h-34v58h-20v-58h-34z' fill='%2316735f'/%3E%3C/svg%3E");
  background-size: cover;
}

.hero strong {
  font-size: 21px;
  line-height: 1.25;
}

.hero span {
  margin-top: 7px;
  font-size: 12px;
  opacity: 0.86;
}

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

.stat {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 11px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  margin-top: 9px;
  font-size: 24px;
  font-weight: 900;
}

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

.card-title {
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.card-sub,
.small {
  font-size: 12px;
}

.card-sub {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

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

.badge {
  flex: 0 0 auto;
  min-height: 25px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.badge.info {
  color: var(--blue);
  background: #eaf2fb;
  border-color: #c3d9ef;
}

.badge.warn {
  color: var(--amber);
  background: #fff4df;
  border-color: #f3cd8c;
}

.badge.ok {
  color: var(--green);
  background: #e8f6ee;
  border-color: #b9e5c8;
}

.badge.danger {
  color: var(--red);
  background: #fff1f0;
  border-color: #f4b8b3;
}

.line {
  padding: 10px 0;
  border-top: 1px solid #edf0ee;
}

.line:first-child {
  border-top: 0;
}

.task-card {
  border-color: #d5e2df;
}

.task-hero {
  min-height: 136px;
  border-radius: 8px;
  overflow: hidden;
  padding: 14px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 57, 71, 0.98), rgba(23, 79, 96, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='260' viewBox='0 0 760 260'%3E%3Crect width='760' height='260' fill='%23dce8e5'/%3E%3Cpath d='M0 210h760v50H0z' fill='%239db0aa'/%3E%3Cg fill='%23235b6c'%3E%3Crect x='354' y='100' width='210' height='78' rx='10'/%3E%3Crect x='560' y='126' width='112' height='52' rx='8'/%3E%3C/g%3E%3Cg fill='%23f6efe1' stroke='%239aa6a0' stroke-width='3'%3E%3Crect x='382' y='70' width='68' height='60' rx='6'/%3E%3Crect x='462' y='76' width='64' height='54' rx='6'/%3E%3C/g%3E%3Cg fill='%23b17b2a'%3E%3Ccircle cx='402' cy='190' r='17'/%3E%3Ccircle cx='526' cy='190' r='17'/%3E%3Ccircle cx='596' cy='190' r='17'/%3E%3Ccircle cx='652' cy='190' r='17'/%3E%3C/g%3E%3Cpath d='M84 74h170v102H84z' fill='%23ffffff' opacity='.35'/%3E%3Cpath d='M104 96h126M104 122h102M104 148h138' stroke='%23ffffff' stroke-width='12' stroke-linecap='round' opacity='.5'/%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.task-hero .head {
  margin-bottom: 10px;
}

.task-hero h2 {
  margin: 0;
  max-width: 82%;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.task-meta {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.82;
}

.route-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.info-panel {
  padding-bottom: 12px;
}

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

.info-item {
  min-height: 62px;
  border-radius: 8px;
  background: #f7faf8;
  border: 1px solid #e3ebe7;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.info-item span {
  color: var(--muted);
  font-size: 12px;
}

.info-item strong {
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.address-block {
  margin-top: 8px;
  min-height: 44px;
  border-radius: 8px;
  background: #eef6f4;
  color: #163f4b;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.delivery-ticket {
  position: relative;
  overflow: hidden;
}

.delivery-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 54px;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), #7aa99e);
}

.goods {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.goods.compact {
  gap: 6px;
}

.goods-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid #e2e9e6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfcfb);
  padding: 8px 9px;
}

.goods-index {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #eaf4f2;
  font-size: 11px;
  font-weight: 900;
}

.goods-name {
  min-width: 0;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.qty-pill {
  min-width: 46px;
  min-height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--brand);
  padding: 3px 10px;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

.notice-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.notice {
  border-radius: 8px;
  border: 1px solid #e1e9e6;
  background: #f8fbfa;
  padding: 10px;
}

.notice.important {
  background: #fff8ea;
  border-color: #efd49a;
}

.notice-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.notice strong {
  display: block;
  font-size: 14px;
  line-height: 1.55;
}

.timeline {
  display: grid;
  gap: 0;
  padding-left: 2px;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  position: relative;
  padding-bottom: 14px;
}

.step::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: #dce8e4;
}

.step:last-child {
  padding-bottom: 0;
}

.step:last-child::after {
  display: none;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8edf0;
  color: var(--muted);
}

.step.done .step-dot {
  background: var(--green);
  color: white;
}

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

.status-btn {
  min-height: 72px;
  flex-direction: column;
  color: var(--brand);
  background: linear-gradient(180deg, #f9fcfc, #eff7f6);
  border: 1px solid #c3d4d7;
  font-size: 12px;
  font-weight: 800;
}

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

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

.upload-tile {
  min-height: 92px;
  border: 1px dashed #adc1c6;
  border-radius: 8px;
  background: #fbfcfb;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.upload-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.seg {
  flex: 0 0 auto;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.seg.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 460px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.tab {
  min-height: 58px;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.tab.active {
  color: var(--brand);
  background: #eaf2f3;
  font-weight: 850;
}

.empty {
  min-height: 116px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  background: rgba(16, 29, 35, 0.48);
}

.sheet {
  width: min(100%, 460px);
  max-height: 88vh;
  overflow: auto;
  margin: 0 auto;
  border-radius: 8px 8px 0 0;
  padding: 15px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 60;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 432px);
  padding: 12px 14px;
  font-weight: 800;
}

.toast.error {
  color: var(--red);
  border-color: #efb4ae;
}

.toast.success {
  color: var(--green);
  border-color: #b9e5c8;
}

@media (min-width: 760px) {
  body {
    padding: 22px 0;
  }

  .phone,
  .login {
    min-height: calc(100vh - 44px);
    border-radius: 8px;
    overflow: hidden;
  }

  .bottom-nav {
    bottom: 22px;
    border-radius: 0 0 8px 8px;
  }
}
