/* ============================================================
   共同注文 · Prototype Design System
   Aligned with brixa-fe aesthetic:
   - Noto Sans JP, clean sans
   - white/gray-50 surfaces, subtle borders
   - blue #007AFF primary, signature gradient accent
   - rounded-xl/2xl/3xl softness, shadow-sm/md/xl
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

:root {
  /* Surfaces */
  --bg:             #ffffff;
  --bg-soft:        #f9fafb;   /* gray-50 */
  --bg-mute:        #f3f4f6;   /* gray-100 */
  --bg-deep:        #e5e7eb;   /* gray-200 */

  /* Borders */
  --border:         #e5e7eb;   /* gray-200 */
  --border-strong:  #d1d5db;   /* gray-300 */
  --border-faint:   #f3f4f6;   /* gray-100 */

  /* Text */
  --ink:            #111827;   /* gray-900 */
  --ink-soft:       #4b5563;   /* gray-600 */
  --ink-faint:      #9ca3af;   /* gray-400 */
  --ink-whisper:    #d1d5db;   /* gray-300 */

  /* Primary */
  --blue:           #007AFF;
  --blue-dark:      #0062cc;
  --blue-soft:      #e5f1ff;
  --blue-tint:      #f0f7ff;

  /* Status */
  --green:          #10b981;
  --green-soft:     #d1fae5;
  --amber:          #f59e0b;
  --amber-soft:     #fef3c7;
  --red:            #ef4444;
  --red-soft:       #fee2e2;
  --purple:         #8b5cf6;
  --purple-soft:    #ede9fe;

  /* Brixa signature gradient — used for hero status, key CTA, borders */
  --grad:             linear-gradient(90deg, #178af7 0%, #6918f6 49%, #f65b18 100%);
  --grad-diag:        linear-gradient(135deg, #178af7 0%, #6918f6 52%, #f65b18 100%);
  --grad-wash:        linear-gradient(90deg, rgba(23,138,247,0.10), rgba(105,24,246,0.10), rgba(246,91,24,0.10));

  /* Radii */
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 20px;
  --r-3xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --sh-sm:   0 1px 2px rgba(17,24,39,0.04);
  --sh-md:   0 4px 12px rgba(17,24,39,0.06), 0 2px 4px rgba(17,24,39,0.04);
  --sh-lg:   0 12px 32px rgba(17,24,39,0.08), 0 4px 8px rgba(17,24,39,0.04);
  --sh-xl:   0 24px 48px -12px rgba(17,24,39,0.12), 0 8px 16px rgba(17,24,39,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  font-feature-settings: 'palt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography helpers --- */
.h1 { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.h2 { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; line-height: 1.4; }
.h3 { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.lede { font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.caption { font-size: 12px; color: var(--ink-soft); }
.tiny { font-size: 11px; color: var(--ink-faint); }
.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.mono { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

.grad-text {
  background: var(--grad-diag);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* --- Dev toolbar (prototype only) --- */
.dev-bar {
  background: var(--ink);
  color: #fff;
  padding: 8px 24px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.02em;
}
.dev-bar strong { color: #fff; font-weight: 700; }
.dev-bar a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px;
}
.dev-bar a:hover { color: #fff; border-color: #fff; }
.dev-bar .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f65b18;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(246,91,24,0.25);
  vertical-align: 1px;
}

/* --- Layout --- */
.shell {
  min-height: 100vh;
  display: flex;
}
.content {
  flex: 1;
  padding: 32px 40px 80px;
  max-width: 100%;
  overflow-x: hidden;
}
.content-narrow { max-width: 1040px; margin: 0 auto; padding: 32px 24px 80px; }
.content-tight  { max-width: 820px;  margin: 0 auto; padding: 32px 24px 80px; }

/* --- Sidebar (brixa-fe mypage menu style) --- */
.sidebar {
  width: 240px;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
}
.sidebar .brand {
  padding: 8px 12px 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-faint);
}
.sidebar .brand .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sidebar .brand .logo .grad {
  background: var(--grad-diag);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sidebar .brand .sub {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.sidebar .nav-title {
  padding: 12px 12px 6px;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  font-weight: 500;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-lg);
  transition: all .15s ease;
  margin-bottom: 2px;
}
.sidebar nav a:hover { background: var(--bg-soft); }
.sidebar nav a.active {
  background: var(--blue);
  color: #fff;
}
.sidebar nav a .icon {
  width: 20px; height: 20px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  stroke-width: 1.5;
}
.sidebar nav a .pill {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}
.sidebar nav a.active .pill { background: #fff; color: var(--blue); }
.sidebar .user {
  margin-top: 24px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-faint);
}
.sidebar .user .avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: var(--bg-mute);
  color: var(--ink-soft);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.sidebar .user .meta .name { font-size: 13px; font-weight: 700; color: var(--ink); }
.sidebar .user .meta .org { font-size: 11px; color: var(--ink-faint); }

/* --- Top bar in content --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.topbar .crumb {
  font-size: 12px;
  color: var(--ink-faint);
}
.topbar .crumb a { color: var(--ink-soft); text-decoration: none; }
.topbar .crumb a:hover { color: var(--blue); }
.topbar .crumb .sep { margin: 0 8px; color: var(--ink-whisper); }
.topbar .right { display: flex; gap: 14px; align-items: center; }
.topbar .bell {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
}
.topbar .bell::after {
  content: "";
  position: absolute;
  top: 9px; right: 10px;
  width: 7px; height: 7px;
  border-radius: var(--r-full);
  background: var(--red);
  border: 2px solid var(--bg);
}

/* --- Page heading --- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.page-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.page-head .lede {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
  line-height: 1.8;
}
.page-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.page-head .eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: var(--r-full);
  background: var(--grad-diag);
}

/* --- Cards --- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 24px;
  margin-bottom: 16px;
}
.card.soft {
  background: var(--bg-soft);
  border-color: var(--border);
}
.card.flat {
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: none;
}
.card.elevated {
  box-shadow: var(--sh-md);
  border-color: transparent;
}
.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.card-title .sub { font-size: 12px; color: var(--ink-faint); }
.card-divider { height: 1px; background: var(--border-faint); margin: 16px -24px; }

/* Signature gradient-bordered card (used for hero/empty/CTA moments) */
.card-grad {
  position: relative;
  background: var(--bg);
  border-radius: var(--r-3xl);
  padding: 28px;
  overflow: hidden;
}
.card-grad::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card-grad > * { position: relative; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); border-color: var(--ink-soft); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--bg-mute); color: var(--ink); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: #fecaca;
}
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-grad {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  position: relative;
  overflow: hidden;
}
.btn-grad:hover {
  color: #fff;
  filter: brightness(1.05);
  box-shadow: var(--sh-md);
}
.btn-grad::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
}
.btn-grad:hover::after { left: 140%; }
.btn-pill { border-radius: var(--r-full); padding: 10px 22px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

.link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.link:hover { text-decoration: underline; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--blue); }

/* --- Status badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-mute);
  color: var(--ink-soft);
}
.badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: var(--r-full);
  background: currentColor;
}
.badge-blue    { background: var(--blue-soft); color: var(--blue); }
.badge-green   { background: var(--green-soft); color: #047857; }
.badge-amber   { background: var(--amber-soft); color: #b45309; }
.badge-red     { background: var(--red-soft); color: #b91c1c; }
.badge-purple  { background: var(--purple-soft); color: #6d28d9; }
.badge-gray    { background: var(--bg-mute); color: var(--ink-soft); }
.badge-grad {
  background: var(--grad);
  color: #fff;
  padding: 4px 12px;
}
.badge-grad::before { display: none; }

/* Chip — larger rounded square status label (brixa order card) */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 52px;
  padding: 8px 14px;
  border-radius: var(--r-lg);
  background: var(--bg-mute);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
.chip-grad {
  background: var(--grad);
  color: #fff;
}
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-amber { background: var(--amber-soft); color: #b45309; }
.chip-gray  { background: var(--bg-mute); color: var(--ink-soft); }
.chip-green { background: var(--green-soft); color: #047857; }

/* --- Tabs (underline style) --- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs a:hover { color: var(--ink-soft); }
.tabs a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}
.tabs a .count {
  background: var(--bg-mute);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
}
.tabs a.active .count { background: var(--blue-soft); color: var(--blue); }

/* --- Tables --- */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--bg);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}
table.data thead th {
  text-align: left;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
table.data tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
  color: var(--ink);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--bg-soft); }

/* --- Forms --- */
.field { margin-bottom: 18px; }
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.field-label .req {
  color: var(--red);
  font-size: 11px;
  font-weight: 500;
  margin-left: 4px;
}
.field-label .opt {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
}
.field-label .hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-faint);
}

.input,
input[type=text],
input[type=number],
input[type=date],
input[type=email],
input[type=tel],
input[type=password],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  outline: none;
  transition: all .15s ease;
}
input:hover, select:hover, textarea:hover, .input:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus, .input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
textarea { resize: vertical; min-height: 96px; }
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4.5l4 4 4-4' stroke='%234b5563' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix,
.input-group .suffix {
  position: absolute;
  font-size: 13px;
  color: var(--ink-faint);
  pointer-events: none;
}
.input-group .prefix { left: 14px; }
.input-group .suffix { right: 14px; }
.input-group input { padding-right: 44px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all .15s ease;
  background: var(--bg);
}
.checkbox:hover { border-color: var(--ink-soft); background: var(--bg-soft); }
.checkbox input {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}
.checkbox.checked { border-color: var(--blue); background: var(--blue-tint); }

.radio-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-row label {
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  cursor: pointer;
  font-size: 13px;
  transition: all .15s ease;
  background: var(--bg);
}
.radio-row label:hover { border-color: var(--ink-soft); }
.radio-row input { display: none; }
.radio-row input:checked + span,
.radio-row label.checked {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* --- Search bar --- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--bg);
  max-width: 320px;
}
.search input {
  border: 0;
  padding: 0;
  flex: 1;
  background: transparent;
}
.search input:focus { box-shadow: none; }
.search .icon { color: var(--blue); font-size: 14px; stroke-width: 1.5; }

/* --- Grid helpers --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-main { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: flex-start; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .grid-main { grid-template-columns: 1fr; }
}

/* --- Stat / KPI --- */
.stat {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.stat .k {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: uppercase;
}
.stat .v {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .v .unit { font-size: 14px; color: var(--ink-soft); font-weight: 500; margin-left: 4px; }
.stat .delta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}
.stat .delta.down { color: var(--red); }

/* --- List row (brixa-fe order card pattern) --- */
.list-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-3xl);
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: all .2s ease;
}
.list-row:hover {
  box-shadow: var(--sh-md);
  border-color: transparent;
}
.list-row.grad-border {
  position: relative;
}
.list-row.grad-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.list-row > * { position: relative; }

/* --- Note / alert --- */
.note {
  padding: 14px 18px;
  background: var(--blue-tint);
  border: 1px solid var(--blue-soft);
  border-radius: var(--r-xl);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.8;
}
.note .title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
  font-size: 13px;
}
.note.amber { background: #fffbeb; border-color: #fde68a; }
.note.amber .title { color: #b45309; }
.note.red { background: var(--red-soft); border-color: #fecaca; }
.note.red .title { color: #b91c1c; }
.note.soft { background: var(--bg-soft); border-color: var(--border); }
.note.soft .title { color: var(--ink); }

/* --- Progress bar --- */
.progress {
  height: 8px;
  background: var(--bg-mute);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress .fill {
  height: 100%;
  background: var(--grad);
  border-radius: var(--r-full);
  transition: width .5s ease;
}
.progress.flat .fill { background: var(--blue); }

/* --- Step indicator --- */
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.steps .step {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--r-xl);
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
}
.steps .step.current {
  border-color: var(--blue);
  background: var(--blue-tint);
}
.steps .step.done { color: var(--ink-faint); border-color: var(--border); background: var(--bg-soft); }
.steps .step.done::before {
  content: "✓";
  position: absolute;
  top: 10px; right: 12px;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}
.steps .step .n {
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.steps .step.current .n { color: var(--blue); }
.steps .step .label {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.steps .step.done .label { color: var(--ink-faint); }

/* --- Spec table (definition list) --- */
.spec {
  display: grid;
  grid-template-columns: 160px 1fr;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.spec dt, .spec dd { margin: 0; padding: 14px 18px; font-size: 13px; }
.spec dt {
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 1px solid var(--border-faint);
  border-right: 1px solid var(--border-faint);
}
.spec dd {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--border-faint);
}
.spec dt:nth-last-of-type(1),
.spec dd:nth-last-of-type(1) { border-bottom: 0; }

/* --- Dropzone --- */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-soft);
  border-radius: var(--r-xl);
  padding: 40px 24px;
  text-align: center;
  transition: all .15s ease;
  cursor: pointer;
}
.dropzone:hover { border-color: var(--blue); background: var(--blue-tint); }
.dropzone .glyph {
  font-size: 32px;
  color: var(--blue);
  line-height: 1;
}
.dropzone .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 10px;
}
.dropzone .hint {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--r-3xl);
  box-shadow: var(--sh-xl);
  max-width: 560px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-head {
  padding: 28px 32px 16px;
}
.modal-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.modal-head .sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.modal-body { padding: 8px 32px 24px; }
.modal-foot {
  padding: 16px 32px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border-faint);
  background: var(--bg-soft);
  border-radius: 0 0 var(--r-3xl) var(--r-3xl);
}

/* --- Filter bar --- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.chip-filter {
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all .15s ease;
}
.chip-filter:hover { border-color: var(--ink-soft); }
.chip-filter.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* --- Pagination --- */
.pager {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 24px;
}
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
}
.pager a:hover { border-color: var(--ink-soft); color: var(--ink); }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Price ladder --- */
.price-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.price-ladder .tier {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  position: relative;
}
.price-ladder .tier.current {
  border-color: transparent;
  background: var(--bg);
}
.price-ladder .tier.current::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.price-ladder .tier .range {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  font-weight: 500;
}
.price-ladder .tier .price {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.price-ladder .tier.current .price {
  background: var(--grad-diag);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Empty state --- */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-faint);
  font-size: 14px;
}

/* --- Animations --- */
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .12s; }
.rise-3 { animation-delay: .2s; }
.rise-4 { animation-delay: .28s; }
.rise-5 { animation-delay: .35s; }
.rise-6 { animation-delay: .42s; }

/* --- Utilities --- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-ink { color: var(--ink); }
.text-soft { color: var(--ink-soft); }
.text-faint { color: var(--ink-faint); }
.text-blue { color: var(--blue); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-bold { font-weight: 700; }
.hidden { display: none; }

/* ============================================================
   OQ Bubble — 客户确认点的气泡标注
   用法：在 position: relative 的容器里放 .oq-bubble
   方向：arrow-left / arrow-right / arrow-top / arrow-bottom
   ============================================================ */
.oq-anchor { position: relative; }

.oq-bubble {
  position: absolute;
  z-index: 30;
  background: #fff;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 10px 12px;
  max-width: 280px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
  font-family: 'Noto Sans JP', sans-serif;
  animation: oq-bubble-pulse 2.5s ease-in-out infinite;
}

@keyframes oq-bubble-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25); }
  50%      { box-shadow: 0 12px 32px rgba(245, 158, 11, 0.45); }
}

.oq-bubble-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.oq-bubble-id {
  display: inline-block;
  padding: 2px 8px;
  background: #f59e0b;
  color: #fff;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.oq-bubble-tag {
  font-size: 10px;
  color: #b45309;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.oq-bubble-q {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.6;
}
.oq-bubble-hint {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.oq-bubble-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: 11px;
  color: #b45309;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted #b45309;
  padding-bottom: 1px;
}
.oq-bubble-link:hover { color: #78350f; border-bottom-style: solid; }

/* Arrow / tail variants */
.oq-bubble.arrow-left::before,
.oq-bubble.arrow-left::after,
.oq-bubble.arrow-right::before,
.oq-bubble.arrow-right::after,
.oq-bubble.arrow-top::before,
.oq-bubble.arrow-top::after,
.oq-bubble.arrow-bottom::before,
.oq-bubble.arrow-bottom::after {
  content: "";
  position: absolute;
  width: 0; height: 0;
  border-style: solid;
}

.oq-bubble.arrow-left::before {
  left: -12px; top: 16px;
  border-width: 10px 12px 10px 0;
  border-color: transparent #f59e0b transparent transparent;
}
.oq-bubble.arrow-left::after {
  left: -9px; top: 17px;
  border-width: 9px 10px 9px 0;
  border-color: transparent #fff transparent transparent;
}
.oq-bubble.arrow-right::before {
  right: -12px; top: 16px;
  border-width: 10px 0 10px 12px;
  border-color: transparent transparent transparent #f59e0b;
}
.oq-bubble.arrow-right::after {
  right: -9px; top: 17px;
  border-width: 9px 0 9px 10px;
  border-color: transparent transparent transparent #fff;
}
.oq-bubble.arrow-top::before {
  top: -12px; left: 20px;
  border-width: 0 10px 12px 10px;
  border-color: transparent transparent #f59e0b transparent;
}
.oq-bubble.arrow-top::after {
  top: -9px; left: 21px;
  border-width: 0 9px 10px 9px;
  border-color: transparent transparent #fff transparent;
}
.oq-bubble.arrow-bottom::before {
  bottom: -12px; left: 20px;
  border-width: 12px 10px 0 10px;
  border-color: #f59e0b transparent transparent transparent;
}
.oq-bubble.arrow-bottom::after {
  bottom: -9px; left: 21px;
  border-width: 10px 9px 0 9px;
  border-color: #fff transparent transparent transparent;
}

/* 按需给 anchor 元素一个轻微的虚线高亮框 */
.oq-highlight {
  outline: 2px dashed #f59e0b;
  outline-offset: 3px;
  border-radius: 4px;
}

/* 气泡 toggle 控件（固定右下角） */
.oq-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f59e0b;
  color: #fff;
  border: 0;
  border-radius: 9999px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245,158,11,0.35);
  transition: all .2s ease;
}
.oq-toggle:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(245,158,11,0.5);
}
.oq-toggle .oq-toggle-state {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(255,255,255,0.25);
  border-radius: 9999px;
  letter-spacing: 0.04em;
}

/* 隐藏气泡时 body 加 .oq-hidden 类 */
body.oq-hidden .oq-bubble { display: none; }
body.oq-hidden .oq-toggle { background: var(--ink-soft); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
body.oq-hidden .oq-toggle:hover { background: var(--ink); }
