/*
 * partner-2026-06-17.css
 *
 * Partner dashboard + needs-feed body styles for the HRH redesign.
 * Depends on design-tokens-2026-06-17.css and app-shell-2026-06-17.css being
 * loaded first.
 *
 * All selectors are global (scoped naturally by the redesign's component names),
 * but the .appshell .main wrapper means these only apply within the new shell.
 */

/* ===== KPI grid ===== */
.appshell .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .appshell .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .appshell .kpis { grid-template-columns: 1fr; } }
.appshell .kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.appshell .kpi .row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.appshell .kpi .row1 .ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.appshell .kpi .row1 .ico svg { width: 16px; height: 16px; }
.appshell .kpi .row1 .delta { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--success-bg); color: var(--success); }
.appshell .kpi .row1 .delta.down { background: var(--critical-bg); color: var(--critical); }
.appshell .kpi .row1 .delta.flat { background: var(--surface-2); color: var(--muted); }
.appshell .kpi .n { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -0.02em; }
.appshell .kpi .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.appshell .kpi .lbl small { display: block; font-size: 10.5px; opacity: 0.85; margin-top: 1px; }
.appshell .kpi.purple .ico { background: var(--hra-lavender-bg); color: var(--hra-purple); }
.appshell .kpi.amber .ico  { background: var(--warning-bg); color: var(--warning); }
.appshell .kpi.green .ico  { background: var(--success-bg); color: var(--success); }
.appshell .kpi.blue .ico   { background: var(--info-bg); color: var(--info); }
.appshell .kpi.coral .ico  { background: var(--critical-bg); color: var(--critical); }

/* ===== Incident banner ===== */
.appshell .incident { background: linear-gradient(180deg, #FFF1F2 0%, #FFE4E6 100%); border: 1px solid #FECDD3; border-left: 4px solid var(--critical); border-radius: var(--r-lg); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.appshell .incident .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--critical); color: #fff; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; }
.appshell .incident .body { flex: 1; min-width: 0; }
.appshell .incident .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; color: #5C0B12; font-size: 14px; }
.appshell .incident .meta { font-size: 12px; color: #6F1F25; margin-top: 4px; }

/* ===== Dashboard 2-column grid ===== */
.appshell .dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
@media (max-width: 1100px) { .appshell .dash-grid { grid-template-columns: 1fr; } }

/* ===== Cards ===== */
.appshell .v2card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.appshell .v2card-head { padding: 14px 18px; border-bottom: 1px solid var(--border-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.appshell .v2card-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.appshell .v2card-head h2 svg { width: 16px; height: 16px; color: var(--hra-purple); }
.appshell .v2card-head .meta { font-size: 12px; color: var(--muted); }
.appshell .v2card-body { padding: 18px; }
.appshell .v2card-body.flush { padding: 0; }

/* ===== Buttons (scoped to .appshell so they don't fight Bootstrap on other pages) ===== */
.appshell .btn-v2 { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: var(--hra-purple); color: #fff; font-family: inherit; font-weight: 600; font-size: 13px; height: 36px; padding: 0 16px; border-radius: var(--r-md); cursor: pointer; text-decoration: none; transition: background .15s ease, transform .05s ease; white-space: nowrap; }
.appshell .btn-v2:hover { background: var(--hra-purple-dark); color: #fff; }
.appshell .btn-v2:active { transform: translateY(1px); }
.appshell .btn-v2.secondary { background: var(--surface); color: var(--hra-purple); border: 1px solid var(--border); }
.appshell .btn-v2.secondary:hover { background: var(--hra-lavender-bg); border-color: var(--hra-lavender); }
.appshell .btn-v2.ghost { background: transparent; color: var(--text); border: 1px solid transparent; }
.appshell .btn-v2.ghost:hover { background: var(--surface-2); color: var(--text); }
.appshell .btn-v2.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }

/* ===== Tabs ===== */
.appshell .v2tabs { display: flex; gap: 4px; padding: 0 4px; border-bottom: 1px solid var(--border-2); background: var(--surface); }
.appshell .v2tabs button { background: transparent; border: none; padding: 10px 14px; font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-family: inherit; }
.appshell .v2tabs button:hover { color: var(--text); }
.appshell .v2tabs button.active { color: var(--hra-purple); border-bottom-color: var(--hra-purple); font-weight: 600; }
.appshell .v2tabs button .count { margin-left: 4px; font-size: 11px; background: var(--surface-2); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.appshell .v2tabs button.active .count { background: var(--hra-lavender-bg); color: var(--hra-purple); }

/* ===== Needs feed ===== */
.appshell .need-row { display: grid; grid-template-columns: 4px 1fr auto; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border-2); position: relative; text-decoration: none; color: inherit; transition: background .12s ease; }
.appshell .need-row:last-child { border-bottom: none; }
.appshell .need-row:hover { background: var(--surface-2); }
.appshell .need-row .rail { width: 4px; border-radius: 999px; background: var(--border); align-self: stretch; }
.appshell .need-row.critical .rail { background: var(--critical); }
.appshell .need-row.high .rail { background: var(--warning); }
.appshell .need-row.medium .rail { background: var(--hra-purple-light); }
.appshell .need-row .body { min-width: 0; }
.appshell .need-row .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.appshell .need-row .req-num { font-size: 11px; font-weight: 600; color: var(--hra-purple); letter-spacing: -0.01em; }
.appshell .need-row .title { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.appshell .need-row .descr { font-size: 12.5px; color: var(--text); margin: 0 0 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.appshell .need-row .meta-row { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 11.5px; color: var(--muted); }
.appshell .need-row .meta-row span { display: inline-flex; align-items: center; gap: 4px; }
.appshell .need-row .meta-row b { color: var(--text); font-weight: 600; }
.appshell .need-row .meta-row svg { width: 12px; height: 12px; opacity: 0.7; }
.appshell .need-row .rhs { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 140px; }
.appshell .need-row .when { font-size: 11px; color: var(--muted); text-align: right; }
.appshell .need-row .when b { color: var(--ink); font-weight: 600; display: block; font-size: 12.5px; }
.appshell .need-row .claim-btn { background: var(--hra-purple); color: #fff; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; text-decoration: none; }
.appshell .need-row .claim-btn:hover { background: var(--hra-purple-dark); color: #fff; }

/* Priority pill + category badge */
.appshell .pri { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.appshell .pri::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.appshell .pri.critical { background: var(--critical-bg); color: var(--critical); }
.appshell .pri.high     { background: var(--warning-bg); color: var(--warning); }
.appshell .pri.medium   { background: var(--hra-lavender-bg); color: var(--hra-purple); }
.appshell .cat-badge { display: inline-flex; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; background: var(--hra-lavender-bg); color: var(--hra-purple-dark); border: 1px solid var(--hra-lavender); }

/* ===== Active-claims side card ===== */
.appshell .claims-list { display: flex; flex-direction: column; }
.appshell .claim-item { padding: 14px 18px; border-bottom: 1px solid var(--border-2); display: block; text-decoration: none; color: inherit; }
.appshell .claim-item:last-child { border-bottom: none; }
.appshell .claim-item:hover { background: var(--surface-2); }
.appshell .claim-item .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.appshell .claim-item .req-num { font-size: 11px; font-weight: 600; color: var(--hra-purple); }
.appshell .claim-item .when { font-size: 11px; color: var(--muted); }
.appshell .claim-item .title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.appshell .claim-item .progress-row { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.appshell .claim-item .progress-row .bar { flex: 1; height: 5px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border-2); }
.appshell .claim-item .progress-row .fill { display: block; height: 100%; background: var(--hra-purple); }
.appshell .claim-item .progress-row .fill.green { background: var(--success); }
.appshell .claim-item .progress-row .fill.amber { background: var(--warning); }
.appshell .claim-item .progress-row b { color: var(--text); font-weight: 600; }
.appshell .stage-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--hra-lavender-bg); color: var(--hra-purple); }
.appshell .stage-tag.shipped { background: var(--info-bg); color: var(--info); }
.appshell .stage-tag.delivered { background: var(--success-bg); color: var(--success); }
.appshell .stage-tag.preparing { background: var(--warning-bg); color: var(--warning); }

/* ===== Quick actions ===== */
.appshell .quick-actions { display: flex; flex-direction: column; gap: 8px; }
.appshell .quick-actions a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); text-decoration: none; color: var(--text); background: var(--surface); }
.appshell .quick-actions a:hover { border-color: var(--hra-lavender); background: var(--hra-lavender-bg); }
.appshell .quick-actions .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--hra-lavender-bg); color: var(--hra-purple); display: grid; place-items: center; flex-shrink: 0; }
.appshell .quick-actions .stack { flex: 1; min-width: 0; }
.appshell .quick-actions strong { font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.appshell .quick-actions span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.appshell .quick-actions svg.chev { width: 14px; height: 14px; color: var(--muted-2); }

/* ===== Verified partner card ===== */
.appshell .verified-card .mark { width: 44px; height: 44px; border-radius: 10px; background: var(--hra-purple); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: -0.02em; position: relative; flex-shrink: 0; }
.appshell .verified-card .mark .check { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--success); border: 3px solid var(--surface); display: grid; place-items: center; }
.appshell .verified-card .org-line { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.appshell .verified-card .since-line { font-size: 11px; color: var(--muted); margin-top: 2px; }
.appshell .verified-card p.note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.appshell .verified-card .row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

/* Side rail spacing */
.appshell .side-rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
