/*
 * partner-need-detail-2026-06-17.css
 * Need-detail body styles: detail header, spec grid, line items, slots, timeline,
 * claim form, facility card.
 * No match banner. No Funding spec. No similar-needs recommender. Per README.
 */

/* ===== Detail header ===== */
.appshell .detail-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.appshell .detail-header.critical { border-left: 4px solid var(--critical); }
.appshell .detail-header.high { border-left: 4px solid var(--warning); }
.appshell .detail-header.medium { border-left: 4px solid var(--hra-purple-light); }
.appshell .detail-header .topline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.appshell .detail-header .req-num { font-size: 12px; font-weight: 700; color: var(--hra-purple); }
.appshell .detail-header .status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--hra-lavender-bg); color: var(--hra-purple-dark); border: 1px solid var(--hra-lavender); }
.appshell .detail-header .status-pill .led { width: 7px; height: 7px; border-radius: 50%; background: var(--hra-purple); }
.appshell .detail-header h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1.25; }
.appshell .detail-header .sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.appshell .detail-header .header-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* lg button variant */
.appshell .btn-v2.lg { height: 42px; padding: 0 20px; font-size: 14px; }
.appshell .btn-v2.icon { width: 36px; padding: 0; justify-content: center; }

/* ===== Detail layout ===== */
.appshell .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: flex-start; }
@media (max-width: 1100px) { .appshell .detail-layout { grid-template-columns: 1fr; } }

/* ===== Spec grid ===== */
.appshell .spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border-2); }
.appshell .spec { padding: 14px 18px; border-right: 1px solid var(--border-2); min-width: 0; }
.appshell .spec:last-child { border-right: none; }
.appshell .spec .lbl { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.appshell .spec .val { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.appshell .spec .val small { font-weight: 500; color: var(--muted); font-size: 11.5px; display: block; margin-top: 1px; }
.appshell .spec.warn .val { color: var(--critical); }

/* ===== Line items table ===== */
.appshell .lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.appshell .lines th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border-2); }
.appshell .lines th.r { text-align: right; }
.appshell .lines td { padding: 12px 18px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.appshell .lines tr:last-child td { border-bottom: none; }
.appshell .lines .name { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.appshell .lines .sku { font-size: 11.5px; color: var(--muted); margin-top: 1px; font-family: 'SF Mono',Menlo,Consolas,monospace; }
.appshell .lines .spec-row { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.appshell .lines .qty { font-size: 14px; font-weight: 600; color: var(--ink); text-align: right; white-space: nowrap; }
.appshell .lines .qty small { font-size: 11px; font-weight: 500; color: var(--muted); display: block; }
.appshell .lines .accept { font-size: 12px; color: var(--text); }
.appshell .lines .accept .ok { color: var(--success); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.appshell .lines .accept .ok svg { width: 11px; height: 11px; }

/* ===== Description block ===== */
.appshell .descr-block { padding: 18px; font-size: 13.5px; color: var(--text); line-height: 1.6; }
.appshell .descr-block p { margin: 0 0 10px; }
.appshell .descr-block p:last-child { margin-bottom: 0; }
.appshell .descr-block .callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--warning-bg); border: 1px solid #FDE68A; color: #78350F; font-size: 12.5px; margin: 10px 0 0; }
.appshell .descr-block .callout svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--warning); }
.appshell .descr-block .callout b { font-weight: 600; }

/* ===== Slots ===== */
.appshell .slots-card { padding: 18px; }
.appshell .slots-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.appshell .slots-bar .slot { flex: 1; height: 54px; border-radius: 8px; border: 1.5px dashed var(--border); background: var(--surface-2); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.appshell .slots-bar .slot .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; margin-bottom: 3px; }
.appshell .slots-bar .slot .lbl { font-weight: 600; color: var(--text); font-size: 11px; }
.appshell .slots-bar .slot.filled { border: 1px solid var(--hra-lavender); background: var(--hra-lavender-bg); color: var(--hra-purple-dark); }
.appshell .slots-bar .slot.open { cursor: pointer; }
.appshell .slots-bar .slot.open:hover { border-color: var(--hra-purple); background: #fff; }
.appshell .slots-bar .slot.open .plus { width: 24px; height: 24px; border-radius: 50%; background: var(--hra-purple); color: #fff; display: grid; place-items: center; margin-bottom: 3px; }
.appshell .slots-bar .slot.open .plus svg { width: 14px; height: 14px; }
.appshell .slot-summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; color: var(--text); }
.appshell .slot-summary b { color: var(--ink); font-weight: 600; }

/* ===== Claim form (purple-bordered action card) ===== */
.appshell .claim-card { border: 2px solid var(--hra-purple); background: linear-gradient(180deg, var(--surface), var(--hra-lavender-bg) 200%); box-shadow: var(--shadow-md); }
.appshell .claim-card .v2card-head { background: linear-gradient(90deg, var(--hra-purple), var(--hra-purple-dark)); border-bottom: none; }
.appshell .claim-card .v2card-head h2 { color: #fff; }
.appshell .claim-card .v2card-head h2 svg { color: #fff; }
.appshell .claim-card .badge { background: rgba(255,255,255,0.18); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }

.appshell .form-row { margin-bottom: 14px; }
.appshell .form-row:last-child { margin-bottom: 0; }
.appshell .form-row label { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.appshell .form-row label .opt { font-weight: 500; color: var(--muted-2); margin-left: 4px; }
.appshell .form-row .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.appshell .v2input, .appshell .v2select, .appshell .v2textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13px; color: var(--text); background: var(--surface); }
.appshell .v2textarea { min-height: 64px; resize: vertical; }
.appshell .v2input:focus, .appshell .v2select:focus, .appshell .v2textarea:focus { outline: 2px solid var(--hra-lavender); outline-offset: 0; border-color: var(--hra-purple-light); }
.appshell .input-with-suffix { position: relative; }
.appshell .input-with-suffix .suf { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-weight: 500; pointer-events: none; }
.appshell .input-with-suffix .v2input { padding-right: 64px; }

.appshell .qty-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.appshell .qty-mode label { position: relative; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: var(--surface); margin: 0; font-weight: 500; }
.appshell .qty-mode label:has(input:checked) { border-color: var(--hra-purple); background: var(--hra-lavender-bg); outline: 1px solid var(--hra-purple); outline-offset: -2px; }
.appshell .qty-mode input { position: absolute; opacity: 0; }
.appshell .qty-mode .tt { font-size: 13px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 1px; }
.appshell .qty-mode .dd { font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }

.appshell .confirm-list { list-style: none; padding: 0; margin: 0 0 14px; font-size: 12.5px; color: var(--text); }
.appshell .confirm-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.appshell .confirm-list svg { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; }

.appshell .form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.appshell .form-foot .sub { font-size: 11.5px; color: var(--muted); }

/* ===== Timeline ===== */
.appshell .timeline { position: relative; padding: 6px 18px 18px 30px; }
.appshell .timeline::before { content: ""; position: absolute; left: 24px; top: 8px; bottom: 8px; width: 2px; background: var(--border-2); }
.appshell .tli { position: relative; padding: 6px 0 6px 16px; }
.appshell .tli::before { content: ""; position: absolute; left: -12px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--hra-purple); box-shadow: 0 0 0 3px var(--hra-lavender-bg); }
.appshell .tli.mute::before { background: var(--muted-2); box-shadow: 0 0 0 3px var(--bg); }
.appshell .tli.success::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.appshell .tli.warn::before { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-bg); }
.appshell .tli .when { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.appshell .tli .what { font-size: 13px; color: var(--ink); font-weight: 500; }
.appshell .tli .what b { font-weight: 600; }
.appshell .tli .by { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ===== Facility card ===== */
.appshell .fac-head { padding: 16px 18px; background: linear-gradient(180deg, var(--hra-lavender-bg), var(--surface)); border-bottom: 1px solid var(--border-2); }
.appshell .fac-head .row { display: flex; align-items: center; gap: 12px; }
.appshell .fac-head .mark { width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--hra-purple); letter-spacing: -0.02em; flex-shrink: 0; }
.appshell .fac-head .name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; }
.appshell .fac-head .loc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.appshell .fac-head .status-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--text); flex-wrap: wrap; }
.appshell .fac-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--warning-bg); color: #78350F; border: 1px solid #FDE68A; }
.appshell .fac-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }

.appshell .kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 14px 18px; font-size: 12.5px; }
.appshell .kv dt { color: var(--muted); font-weight: 500; }
.appshell .kv dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.appshell .kv dd small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }

.appshell .contacts { padding: 6px 18px 18px; }
.appshell .contact { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.appshell .contact:last-child { border-bottom: none; }
.appshell .contact .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px; flex-shrink: 0; }
.appshell .contact .stack { flex: 1; min-width: 0; }
.appshell .contact .n { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.appshell .contact .r { font-size: 11px; color: var(--muted); margin-top: 1px; }
.appshell .contact .actions { display: flex; gap: 4px; }
.appshell .contact .actions button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.appshell .contact .actions button:hover { border-color: var(--hra-lavender); color: var(--hra-purple); background: var(--hra-lavender-bg); }
.appshell .contact .actions button svg { width: 13px; height: 13px; }

/* Polish: 768px mobile breakpoint */
@media (max-width: 768px) {
  .appshell .detail-header { padding: 16px 18px; }
  .appshell .detail-header h1 { font-size: 18px; }
  .appshell .header-actions { flex-direction: column; align-items: stretch; }
  .appshell .header-actions .btn-v2 { width: 100%; justify-content: center; }
  .appshell .spec-grid { grid-template-columns: 1fr; }
  .appshell .spec { border-right: none; border-bottom: 1px solid var(--border-2); }
  .appshell .spec:last-child { border-bottom: none; }
  .appshell .lines td { padding: 10px 14px; font-size: 12px; }
  .appshell .slots-bar { flex-direction: column; gap: 8px; }
  .appshell .slots-bar .slot { width: 100%; height: 44px; }
}
