.a-body { background: #f7f7f5; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
}

.login-card h1 { font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 24px; }

.ahead {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.ahead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.atabs { display: flex; gap: 4px; }

.atabs button {
  border: 0;
  background: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.atabs button.on { background: var(--bg-soft); color: var(--fg); font-weight: 500; }

.ahead .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.amain { max-width: 1280px; margin: 0 auto; padding: 28px 24px 80px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}

.stat .n { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar .spacer { margin-left: auto; }

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

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }

table.tbl th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
  white-space: nowrap;
}

table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }

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

table.tbl tr:hover td { background: #fcfcfb; }

.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag.pending { background: #faeeda; color: #854f0b; border-color: #f5d7a0; }
.tag.confirmed { background: #e6f1fb; color: #185fa5; border-color: #b5d4f4; }
.tag.shipped { background: #eeedfe; color: #534ab7; border-color: #cecbf6; }
.tag.done { background: #eaf3de; color: #3b6d11; border-color: #c0dd97; }
.tag.cancelled { background: #f1efe8; color: #5f5e5a; border-color: #d3d1c7; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, 0.35);
  display: flex;
  justify-content: flex-end;
  z-index: 100;
}

.sheet {
  width: min(560px, 100%);
  background: #fff;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
}

.sheet h2 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }

.sheet .close {
  float: right;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; font-size: 13px; }
.kv div:nth-child(odd) { color: var(--muted); }

.status-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

.status-row button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.status-row button.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.imgs .ph { position: relative; }

.imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.imgs .x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 200;
}

.toast.show { opacity: 1; }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .ahead-inner { gap: 10px; padding: 0 14px; overflow-x: auto; }
  .amain { padding: 18px 14px 60px; }
  table.tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .sheet { width: 100%; }
}
