/* Shop admin console - desktop oriented, matches the operator app's tone. */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e3e6ea;
  --text: #1f2328;
  --muted: #6b7280;
  --brand: #2f6fdb;
  --brand-dark: #2559b0;
  --ok: #1f9d55;
  --warn: #b7791f;
  --danger: #c53030;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
header h1 { margin: 0; font-size: 18px; }
header h1 small { color: var(--muted); font-size: 12px; font-weight: 400; }
.actions { display: flex; align-items: center; gap: 12px; }
.link { color: var(--brand); font-size: 13px; text-decoration: none; }
.link:hover { text-decoration: underline; }

nav#tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
nav#tabs button {
  position: relative;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
nav#tabs button.active {
  background: #eaf1fd;
  border-color: #cddffa;
  color: var(--brand);
  font-weight: 600;
}
.badge {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
}

main { padding: 18px 20px 40px; }
.view { display: none; }
.view.active { display: block; }

.card {
  margin-bottom: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toolbar h2 { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.empty { padding: 30px 0; color: var(--muted); text-align: center; }

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; font-weight: 600; }
tbody tr:hover { background: #fafbfc; }
td.actions-cell { white-space: nowrap; }

label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
input[type="checkbox"] { display: inline-block; width: auto; margin: 0 6px 0 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #cddffa; border-color: #9dbcf0; }
textarea { resize: vertical; }

button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
button:hover { background: #f7f8fa; }
button[disabled] { opacity: .5; cursor: not-allowed; }
.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-dark); }
.ghost { background: transparent; }
.danger { border-color: var(--danger); color: var(--danger); }
.danger:hover { background: #fdf0f0; }
.small { padding: 5px 10px; font-size: 12px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag.on { background: #e6f6ec; color: var(--ok); }
.tag.off { background: #f0f1f3; color: var(--muted); }
.tag.warn { background: #fdf3e2; color: var(--warn); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 24, 30, .45);
}
.modal[hidden] { display: none !important; }
.modal-body {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow: auto;
  padding: 20px;
  background: var(--card);
  border-radius: 12px;
}
.modal-body h3 { margin: 0 0 14px; font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 10px 18px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: rgba(31, 35, 40, .92);
  color: #fff;
  font-size: 13px;
}

@media (max-width: 720px) {
  .card { min-width: 0; overflow-x: auto; }
  table { min-width: 640px; }
}

