/* PHASE2_HR_R8A8_ADMIN_MANUAL_ADJUSTMENT_UI_V1 */
.r8a8-foundation-active main section:not(#r8a8-foundation-panel) {
  display: none !important;
}
.r8a8-panel { display: none; }
.r8a8-foundation-active .r8a8-panel { display: block; }
.r8a8-tab { background: #e0e7ff !important; color: #3730a3 !important; }
.r8a8-tab.active { background: #4338ca !important; color: #fff !important; }
.r8a8-card { background:#fff; border-radius:14px; padding:17px; box-shadow:0 3px 14px #1f293712; margin-bottom:15px; }
.r8a8-hero { display:flex; justify-content:space-between; gap:18px; align-items:center; background:linear-gradient(135deg,#eef2ff,#f8fafc); border:1px solid #c7d2fe; }
.r8a8-hero h2 { margin:4px 0 6px; }
.r8a8-hero p { margin:0; color:#475569; line-height:1.55; }
.r8a8-kicker { color:#4338ca; font-size:11px; font-weight:900; letter-spacing:.11em; }
.r8a8-health { min-width:220px; border-radius:12px; padding:12px; display:flex; flex-direction:column; gap:3px; font-size:12px; }
.r8a8-health.is-ok { background:#ecfdf3; border:1px solid #bbf7d0; color:#166534; }
.r8a8-health.is-warn { background:#fffbeb; border:1px solid #fde68a; color:#92400e; }
.r8a8-toolbar { display:flex; justify-content:space-between; gap:12px; align-items:end; flex-wrap:wrap; }
.r8a8-filters { display:grid; grid-template-columns:180px minmax(240px,420px); gap:10px; flex:1; }
.r8a8-filters label,.r8a8-form label { display:flex; flex-direction:column; gap:5px; color:#475569; font-size:12px; font-weight:800; }
.r8a8-filters input,.r8a8-filters select,.r8a8-form input,.r8a8-form select,.r8a8-form textarea { width:100%; border:1px solid #cbd5e1; border-radius:9px; padding:9px 10px; background:#fff; color:#172033; font:inherit; }
.r8a8-form textarea { min-height:86px; resize:vertical; }
.r8a8-summary { display:flex; gap:8px; flex-wrap:wrap; margin:13px 0; }
.r8a8-summary span { padding:7px 10px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:999px; color:#64748b; font-size:12px; }
.r8a8-summary strong { color:#1d4ed8; }
.r8a8-table-wrap { overflow:auto; border:1px solid #e2e8f0; border-radius:11px; }
.r8a8-table { width:100%; border-collapse:collapse; min-width:900px; }
.r8a8-table th,.r8a8-table td { padding:10px 11px; border-bottom:1px solid #e2e8f0; text-align:left; vertical-align:top; font-size:13px; }
.r8a8-table th { position:sticky; top:0; background:#f8fafc; color:#475569; z-index:1; }
.r8a8-source { display:inline-flex; padding:3px 8px; border-radius:999px; font-size:11px; font-weight:900; }
.r8a8-source.decision { background:#fef3c7; color:#92400e; }
.r8a8-source.request { background:#dbeafe; color:#1e40af; }
.r8a8-badge { display:inline-flex; padding:3px 8px; border-radius:999px; background:#e2e8f0; color:#334155; font-size:11px; font-weight:850; }
.r8a8-badge.good { background:#dcfce7; color:#166534; }
.r8a8-badge.bad { background:#fee2e2; color:#991b1b; }
.r8a8-badge.warn { background:#fef3c7; color:#92400e; }
.r8a8-muted { color:#64748b; font-size:12px; }
.r8a8-row-actions,.r8a8-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.r8a8-btn { border:1px solid #cbd5e1; border-radius:9px; padding:9px 12px; background:#fff; color:#334155; font-weight:800; cursor:pointer; }
.r8a8-btn:hover { background:#f8fafc; }
.r8a8-btn:disabled { opacity:.45; cursor:not-allowed; }
.r8a8-btn.r8a8-primary { background:#4338ca; border-color:#4338ca; color:#fff; }
.r8a8-btn.r8a8-secondary { background:#0f766e; border-color:#0f766e; color:#fff; }
.r8a8-btn.r8a8-danger { background:#dc2626; border-color:#dc2626; color:#fff; }
.r8a8-btn.r8a8-small { padding:6px 8px; font-size:12px; }
.r8a8-message { margin:10px 0; padding:10px 12px; border-radius:9px; font-size:13px; }
.r8a8-message.r8a8-info { background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; }
.r8a8-message.r8a8-ok { background:#ecfdf3; border:1px solid #bbf7d0; color:#166534; }
.r8a8-message.r8a8-err { background:#fff1f2; border:1px solid #fecdd3; color:#b42318; }
.r8a8-message.r8a8-warn { background:#fffbeb; border:1px solid #fde68a; color:#92400e; }
.r8a8-empty,.r8a8-loading { padding:28px; text-align:center; color:#64748b; }
.r8a8-modal-backdrop { position:fixed; inset:0; z-index:2147483000; padding:24px 12px; overflow:auto; background:#0f172aa6; }
.r8a8-modal { width:min(1180px,100%); margin:0 auto; background:#f8fafc; border-radius:16px; box-shadow:0 24px 80px #0f172a66; overflow:hidden; }
.r8a8-modal-head { position:sticky; top:0; z-index:3; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:15px 18px; background:#fff; border-bottom:1px solid #e2e8f0; }
.r8a8-modal-head h2 { margin:4px 0 0; font-size:21px; }
.r8a8-close { border:0; background:#e2e8f0; width:38px; height:38px; border-radius:999px; font-size:25px; cursor:pointer; color:#334155; }
.r8a8-modal-tabs { display:flex; gap:6px; padding:10px 14px; overflow:auto; background:#fff; border-bottom:1px solid #e2e8f0; }
.r8a8-modal-tabs button { border:0; border-radius:999px; padding:8px 12px; background:#e2e8f0; color:#334155; font-weight:800; white-space:nowrap; cursor:pointer; }
.r8a8-modal-tabs button.active { background:#4338ca; color:#fff; }
.r8a8-modal-body { padding:16px; }
.r8a8-modal > .r8a8-message { margin:12px 16px 0; }
.r8a8-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:14px; }
.r8a8-detail { padding:11px; border:1px solid #e2e8f0; border-radius:10px; background:#fff; }
.r8a8-detail span { display:block; color:#64748b; font-size:11px; font-weight:800; margin-bottom:4px; }
.r8a8-detail strong { color:#172033; word-break:break-word; }
.r8a8-notice { margin:12px 0; padding:11px 12px; background:#eef2ff; border:1px solid #c7d2fe; border-radius:10px; color:#3730a3; font-size:13px; line-height:1.55; }
.r8a8-segment-list { display:grid; gap:9px; margin-bottom:12px; }
.r8a8-segment { padding:11px; border:1px solid #e2e8f0; border-radius:10px; background:#fff; }
.r8a8-form { padding:14px; background:#fff; border:1px solid #e2e8f0; border-radius:12px; }
.r8a8-form h3 { margin-top:0; }
.r8a8-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.r8a8-span-2 { grid-column:span 2; }
.r8a8-check { flex-direction:row !important; align-items:center; gap:8px !important; }
.r8a8-check input { width:auto !important; }
.r8a8-form.is-locked { opacity:.7; }
.r8a8-split { display:grid; grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr); gap:14px; }
.r8a8-evidence,.r8a8-adjustment-card { padding:12px; margin-bottom:10px; background:#fff; border:1px solid #e2e8f0; border-radius:11px; }
.r8a8-evidence p { margin:8px 0; }
.r8a8-adjustment-head { display:flex; justify-content:space-between; gap:10px; margin-bottom:7px; }
.r8a8-adjustment-card pre,.r8a8-raw pre { max-height:250px; overflow:auto; padding:10px; border-radius:9px; background:#0f172a; color:#e2e8f0; white-space:pre-wrap; word-break:break-word; font-size:11px; }
.r8a8-raw { margin-top:14px; }
.r8a8-raw summary { cursor:pointer; color:#475569; font-weight:800; }
.r8a8-history { display:grid; gap:10px; }
@media(max-width:900px) {
  .r8a8-hero,.r8a8-split { grid-template-columns:1fr; display:grid; }
  .r8a8-health { min-width:0; }
  .r8a8-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .r8a8-filters,.r8a8-form-grid { grid-template-columns:1fr; }
  .r8a8-span-2 { grid-column:auto; }
  .r8a8-modal-backdrop { padding:0; }
  .r8a8-modal { min-height:100vh; border-radius:0; }
  .r8a8-btn { width:100%; }
  .r8a8-row-actions { flex-direction:column; align-items:stretch; }
}
