:root {
  --ink: #1b1f27;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --card: #ffffff;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #e6f4f1;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --ok: #15803d;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(620px, 100% - 28px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wraprow { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f3f4f6; }
.btn.danger { background: var(--danger); }
.btn.small-btn { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn.wide { width: 100%; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }

input[type="text"], input[type="tel"], input[type="number"], input[type="password"], input[type="time"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: var(--brand);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.gray { background: #f3f4f6; color: var(--muted); }

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--warn-soft);
  color: #7c2d12;
  border: 1px solid #fcd34d;
}
.notice.info { background: var(--brand-soft); color: var(--brand-dark); border-color: #b2ddd7; }
.notice.error { background: var(--danger-soft); color: var(--danger); border-color: #fca5a5; }

.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #7f1d1d; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tbody tr:hover { background: #fafafa; }

.foot {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 26px 12px 34px;
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
