/* DB-V04-ASSET-LOOP-07 · onboarding + candidate review (Apple-light direction) */
.inbox-guide {
  width: min(100%, 1080px);
  margin: 0 auto 22px;
  padding: 0 clamp(12px, 2vw, 28px);
}

.inbox-guide-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(120, 170, 255, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.9));
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.inbox-guide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(15, 23, 42, 0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 74%);
}

.inbox-guide-card > * { position: relative; z-index: 1; }

.inbox-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.inbox-guide-kicker {
  display: block;
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.inbox-guide-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.inbox-guide-head p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.65;
}

.inbox-guide-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.inbox-guide-close:hover { background: #fff; color: #111827; transform: scale(1.03); }
.inbox-guide-close:focus-visible,
.inbox-guide button:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }

.inbox-guide-copy {
  margin: 18px 0 24px;
  max-width: 760px;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.inbox-guide-loop {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px;
  list-style: none;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.inbox-guide-loop li:not([aria-hidden]) {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.9);
}

.inbox-guide-loop span { display: block; color: #9ca3af; font-size: 10px; letter-spacing: 0.12em; }
.inbox-guide-loop b { display: block; margin: 4px 0 2px; color: #111827; font-size: 14px; }
.inbox-guide-loop small { display: block; color: #6b7280; font-size: 11px; line-height: 1.4; }
.inbox-guide-loop > li[aria-hidden] { color: #9ca3af; font-size: 13px; }

.inbox-guide-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.inbox-guide-categories article {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 250, 251, 0.72));
}

.inbox-guide-categories span { display: block; color: #2563eb; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; }
.inbox-guide-categories b { display: block; margin: 10px 0 7px; color: #111827; font-size: 16px; line-height: 1.3; }
.inbox-guide-categories small { display: block; color: #6b7280; font-size: 12px; line-height: 1.55; }

.inbox-guide-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.inbox-guide-foot p {
  margin: 0;
  max-width: 640px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.65;
}

.inbox-guide-foot p b { color: #374151; font-weight: 600; }
.inbox-guide-foot > div { display: flex; gap: 9px; flex: 0 0 auto; }

.inbox-guide-primary,
.inbox-guide-secondary,
.inbox-guide-reopen button {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.inbox-guide-primary {
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
}

.inbox-guide-secondary {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.75);
  color: #374151;
}

.inbox-guide-primary:hover,
.inbox-guide-secondary:hover,
.inbox-guide-reopen button:hover { transform: translateY(-1px); }

.inbox-guide-reopen {
  width: min(100%, 1080px);
  margin: 0 auto 12px;
  padding: 0 clamp(12px, 2vw, 28px);
  text-align: right;
}

.inbox-guide-reopen button {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.86);
  color: #4b5563;
}

/* Inbox candidate panel */
.inbox-understanding {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76));
}

.inbox-understanding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.inbox-understanding-head b { display: block; color: #111827; font-size: 13px; }
.inbox-understanding-head small { display: block; margin-top: 3px; color: #6b7280; font-size: 11px; line-height: 1.5; }

.understanding-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.understanding-status[data-status="WAITING"] { background: #f3f4f6; color: #4b5563; }
.understanding-status[data-status="ANALYZING"] { background: #eff6ff; color: #1d4ed8; }
.understanding-status[data-status="SUGGESTED"] { background: #fff7ed; color: #c2410c; }
.understanding-status[data-status="CONFIRMED"] { background: #ecfdf5; color: #047857; }
.understanding-status[data-status="FAILED"] { background: #fef2f2; color: #b91c1c; }
.understanding-status[data-status="REJECTED"] { background: #f3f4f6; color: #6b7280; }

.understanding-ai-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.06);
  color: #475569;
  font-size: 10.5px;
  line-height: 1.55;
}

.understanding-ai-note[data-ai="AI_LIVE_UNVERIFIED"] { background: rgba(107, 114, 128, 0.08); color: #4b5563; }
.understanding-ai-note[data-ai="READY"] { background: rgba(4, 120, 87, 0.08); color: #065f46; }

.understanding-empty,
.understanding-error {
  padding: 10px 0 2px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.6;
}

.understanding-error { color: #b91c1c; }

.understanding-group + .understanding-group { margin-top: 10px; }
.understanding-group-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 6px;
}
.understanding-group-title b { color: #374151; font-size: 11px; }
.understanding-group-title small { color: #9ca3af; font-size: 10px; }

.understanding-candidate {
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.75);
}

.understanding-candidate + .understanding-candidate { margin-top: 6px; }
.understanding-candidate[data-state="ACTIVE"] { border-color: rgba(4, 120, 87, 0.18); background: rgba(236, 253, 245, 0.5); }
.understanding-candidate[data-state="REJECTED"],
.understanding-candidate[data-state="REVOKED"] { opacity: 0.62; }

.understanding-candidate-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.understanding-candidate-main strong { color: #111827; font-size: 12.5px; font-weight: 600; }
.understanding-candidate-main em {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 9.5px;
  font-style: normal;
}
.understanding-candidate-main em[data-source="AI_SUGGESTION"] { background: #eef2ff; color: #4338ca; }
.understanding-candidate-main small { color: #9ca3af; font-size: 10px; }

.understanding-candidate-meta { margin-top: 5px; color: #6b7280; font-size: 10px; line-height: 1.5; }
.understanding-candidate-meta b { color: #4b5563; font-weight: 600; }
.understanding-candidate-evidence { margin-top: 4px; color: #9ca3af; font-size: 9.5px; line-height: 1.5; }

.understanding-candidate-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.understanding-candidate-actions button,
.understanding-inline-actions button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 10.5px;
  cursor: pointer;
}
.understanding-candidate-actions button[data-understanding-action="CONFIRM"] { border-color: #111827; background: #111827; color: #fff; }
.understanding-candidate-actions button:disabled { opacity: 0.5; cursor: default; }

.understanding-edit-row { display: flex; gap: 6px; margin-top: 7px; }
.understanding-edit-row input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 11.5px;
}
.understanding-edit-row input:focus { outline: 2px solid #2563eb; outline-offset: 1px; }

.understanding-confirmed-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.understanding-confirmed-list span {
  padding: 4px 8px;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.8);
  color: #065f46;
  font-size: 10.5px;
}

.understanding-boundary { margin-top: 10px; color: #9ca3af; font-size: 9.5px; line-height: 1.55; }

/* Asset detail section */
.understanding-inline-status { color: #9ca3af; font-size: 10.5px; }
.asset-understanding-content { padding-top: 2px; }
.asset-understanding-content .understanding-ai-note { margin-bottom: 8px; }
.asset-understanding-content .understanding-group { margin-top: 8px; }
.asset-understanding-content .understanding-candidate { background: rgba(255, 255, 255, 0.62); }

@media (max-width: 900px) {
  .inbox-guide-loop { grid-template-columns: 1fr; }
  .inbox-guide-loop > li[aria-hidden] { display: none; }
  .inbox-guide-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-guide-foot { align-items: stretch; flex-direction: column; }
  .inbox-guide-foot > div { justify-content: flex-end; }
}

@media (max-width: 560px) {
  .inbox-guide { padding: 0 10px; }
  .inbox-guide-card { padding: 18px; border-radius: 20px; }
  .inbox-guide-categories { grid-template-columns: 1fr; }
  .inbox-guide-categories article { min-height: 0; }
}
