:root {
  color-scheme: light;
  --brand: #4c3cce;
  --brand-hover: #3e30b7;
  --brand-soft: #f0efff;
  --brand-pale: #f7f6ff;
  --text: #222323;
  --secondary: #555759;
  --muted: #76797c;
  --border: #dddee0;
  --border-light: #ececed;
  --chrome: #f6f7f7;
  --white: #fff;
  --green: #2fac4a;
  --green-soft: #edf9f0;
  --red: #ed513f;
  --red-soft: #fff0ee;
  --amber: #ad6800;
  --amber-soft: #fff7e8;
  --blue: #0c8ce9;
  --blue-soft: #eef7fe;
  --shadow: 0 12px 32px rgba(31, 34, 48, 0.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { display: flex; min-height: 100vh; color: var(--text); background: var(--chrome); font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
.dpnav { position: sticky; top: 0; width: 248px; height: 100vh; flex: 0 0 248px; display: flex; flex-direction: column; gap: 4px; padding: 0 12px 16px; background: var(--white); border-right: 1px solid var(--border-light); overflow-y: auto; }
.dpbrand { height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-bottom: 1px solid var(--border-light); margin-bottom: 8px; font-family: Poppins, Inter, sans-serif; font-weight: 700; font-size: 16px; }
.dpbrand img { width: 32px; height: 32px; }
.dpbrand em { margin-left: 4px; padding: 2px 5px; border-radius: 4px; color: var(--brand); background: var(--brand-soft); font: normal 700 9px/1 Inter, sans-serif; letter-spacing: .08em; }
.dpnav-label { margin: 12px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dpnav-item { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--secondary); text-decoration: none; text-align: left; }
.dpnav-item:hover { background: var(--chrome); color: var(--text); }
.dpnav-item.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.dpnav-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dpnav-item span { flex: 1; }
.dpnav-item b { min-width: 24px; padding: 1px 7px; border-radius: 999px; color: var(--brand); background: var(--white); font-size: 11px; text-align: center; }
.dpnav-spacer { flex: 1; min-height: 24px; }
.dpuser { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; margin-top: 8px; border-top: 1px solid var(--border-light); min-width: 0; }
.dpavatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--brand); font-size: 12px; font-weight: 700; }
.dpuser > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.dpuser b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dpuser small { color: var(--muted); font-size: 11px; }

main { width: calc(100% - 248px); min-width: 0; padding: 32px 40px 64px; }
.dppage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dppage-head h1 { margin: 0; font: 600 28px/1.25 Poppins, Inter, sans-serif; letter-spacing: -.02em; }
.dppage-head p { margin: 6px 0 0; color: var(--secondary); }
.dpeye { margin: 0 0 6px !important; color: var(--brand) !important; font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.dptoast { position: fixed; z-index: 100; top: 18px; left: 50%; max-width: min(520px, calc(100vw - 32px)); padding: 11px 16px; transform: translate(-50%, -12px); border-radius: 8px; background: var(--text); color: var(--white); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .18s ease; }
.dptoast.on { transform: translate(-50%, 0); opacity: 1; }
.dptoast.error { background: var(--red); }

/* common controls */
.dpbtn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); background: var(--white); font-weight: 600; line-height: 1; }
.dpbtn:hover:not(:disabled) { border-color: #b7b9bc; background: var(--chrome); }
.dpbtn.primary { color: var(--white); background: var(--brand); border-color: var(--brand); }
.dpbtn.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.dpbtn.secondary { color: var(--brand); border-color: #c9c4f7; background: var(--white); }
.dpbtn.danger { color: var(--red); border-color: #f2bcb5; background: var(--white); }
.dpbtn.danger:hover:not(:disabled) { color: #c63828; border-color: var(--red); background: var(--red-soft); }
.dpbtn.icon { width: 36px; padding: 0; color: var(--secondary); }
.dpbtn.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dpbtn.full { width: 100%; }
.dpbtn:disabled { opacity: .45; cursor: default; }
input, textarea, select { width: 100%; color: var(--text); background: var(--white); border: 1px solid var(--border); border-radius: 4px; }
input, select { height: 38px; padding: 0 11px; }
textarea { min-height: 72px; padding: 9px 11px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(76, 60, 206, .12); border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: #a0a2a5; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2376797c' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }

/* list */
.dpkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.dpkpis article { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); }
.dpkpis span, .dpkpis small { display: block; color: var(--muted); font-size: 12px; }
.dpkpis b { display: block; margin: 4px 0 2px; font: 600 26px/1.2 Poppins, Inter, sans-serif; }
.dpcard { border: 1px solid var(--border); border-radius: 8px; background: var(--white); }
.dppad { padding: 20px; }
.dplist-card { overflow: hidden; }
.dptools { display: flex; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.dptools label { width: 190px; }
.dptools .dpsearch { position: relative; width: min(360px, 100%); margin-right: auto; }
.dpsearch svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.dpsearch input { padding-left: 36px; }
.dptable-wrap { overflow-x: auto; }
.dptable { width: 100%; border-collapse: collapse; text-align: left; }
.dptable th { height: 40px; padding: 0 16px; color: var(--muted); background: var(--chrome); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.dptable td { height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.dptable tbody tr { cursor: pointer; }
.dptable tbody tr:last-child td { border-bottom: 0; }
.dptable tbody tr:hover td { background: var(--brand-pale); }
.dptable .main { display: block; max-width: 300px; overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dptable .sub { display: block; max-width: 300px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dptable .meta { display: block; max-width: 300px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dptable .go { color: var(--muted); text-align: right; }
.dpstatus, .dppriority { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; color: var(--secondary); background: var(--chrome); font-size: 12px; font-weight: 600; white-space: nowrap; }
.dpstatus::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.dpstatus.received, .dpstatus.identity_verification, .dpstatus.triage { color: var(--brand); background: var(--brand-soft); }
.dpstatus.ready_for_execution, .dpstatus.executing { color: var(--blue); background: var(--blue-soft); }
.dpstatus.awaiting_principal, .dpstatus.awaiting_internal { color: var(--amber); background: var(--amber-soft); }
.dpstatus.review_required { color: #a33c00; background: #fff1e8; }
.dpstatus.fulfilled, .dpstatus.partially_fulfilled { color: var(--green); background: var(--green-soft); }
.dpstatus.refused, .dpstatus.withdrawn, .dpstatus.cancelled { color: var(--red); background: var(--red-soft); }
.dppriority.high, .dppriority.urgent { color: var(--red); background: var(--red-soft); }
.dploading { padding: 8px 16px; }
.dploading i { display: block; height: 44px; margin: 8px 0; border-radius: 6px; background: linear-gradient(90deg, var(--chrome), #ecebfa, var(--chrome)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.dpempty { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; }
.dpempty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); }
.dpempty-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dpempty h2 { margin: 16px 0 4px; font: 600 18px/1.4 Poppins, Inter, sans-serif; }
.dpempty p { max-width: 420px; margin: 0 0 20px; color: var(--muted); }

/* detail */
.dpback { margin: 0 0 16px; padding: 0; border: 0; color: var(--brand); background: transparent; font-weight: 600; }
.detail-head { align-items: center; }
.dptitle-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dpdetail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dpdetail-main, .dpdetail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dpcard-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dpcard-head h2 { margin: 0; font: 600 16px/1.35 Poppins, Inter, sans-serif; }
.dpcard-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.dppad-head { padding: 18px 20px 0; }
.dpfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.dpfacts div { min-width: 0; }
.dpfacts dt { color: var(--muted); font-size: 12px; }
.dpfacts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 500; }
.dpdetail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--border-light); }
.dpdetail-field { padding: 12px; border-radius: 6px; background: var(--chrome); }
.dpdetail-field small { display: block; color: var(--muted); }
.dpdetail-field b { display: block; margin-top: 3px; overflow-wrap: anywhere; font-weight: 500; }
.dptimeline { position: relative; margin: 0; padding: 0; list-style: none; }
.dptimeline::before { content: ""; position: absolute; left: 7px; top: 9px; bottom: 10px; width: 1px; background: var(--border); }
.dptimeline li { position: relative; display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; padding: 0 0 20px; }
.dptimeline li:last-child { padding-bottom: 0; }
.dptimeline i { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 3px; border: 3px solid var(--white); border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.dptimeline b { display: block; font-weight: 600; }
.dptimeline p { margin: 2px 0 0; color: var(--secondary); }
.dptimeline small { color: var(--muted); font-size: 11px; }
.dptimeline time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dpfield { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.dpfield > span { color: var(--secondary); font-size: 12px; font-weight: 600; }
.dpfield > span b { color: var(--red); }
.dpfield > small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.dpinline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dpinline .dpbtn { min-width: 104px; }
.dpresolved-field[readonly] { color: var(--secondary); background: var(--chrome); cursor: default; }
.dpidentity-status { margin: -2px 0 16px; color: var(--muted); font-size: 12px; }
.dpidentity-status.resolved { color: var(--green); font-weight: 600; }
.dpnotes-field { margin-top: 0; }
.dphelp { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.dpnote { padding: 14px 16px; border-left: 3px solid var(--brand); border-radius: 6px; background: var(--brand-pale); }
.dpnote b { color: var(--brand); }
.dpnote p { margin: 3px 0 0; color: var(--secondary); }

/* nominee authority evidence */
.dpevidence-list { display: flex; flex-direction: column; gap: 12px; }
.dpevidence { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); }
.dpevidence-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.dpevidence-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 6px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.dpevidence-top b { display: block; }
.dpevidence-top p { margin: 2px 0; overflow-wrap: anywhere; color: var(--secondary); }
.dpevidence-top small { color: var(--muted); }
.dpevidence-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border-light); color: var(--secondary); font-size: 12px; }
.dpevidence-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dpevidence-review { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border-light); }
.dpevidence-review textarea { min-height: 56px; }
.dpevidence-reason { padding: 10px 12px; margin: 12px 0 0; border-radius: 6px; color: var(--secondary); background: var(--chrome); font-size: 12px; }
.dpevidence-empty { padding: 24px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; }
.dpevidence-empty p { margin: 4px auto 0; max-width: 520px; color: var(--muted); }

/* access */
.dpaccess-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }

/* modal */
.dpmodal { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(34, 35, 35, .48); backdrop-filter: blur(2px); }
.dpmodal-card { width: min(720px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: 8px; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.dpmodal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--border-light); }
.dpmodal-card > header h2 { margin: 0; font: 600 20px/1.35 Poppins, Inter, sans-serif; }
.dpmodal-card > header p:not(.dpeye) { margin: 4px 0 0; color: var(--muted); }
.dpmodal-body { padding: 20px 24px 8px; overflow-y: auto; }
.dpmodal-card > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border-light); }
.dpform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 18px; }
.dpform-grid .wide { grid-column: 1 / -1; }
.dpupdate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.dpupdate-grid .wide { grid-column: 1 / -1; }
.dperasure-note { margin-bottom: 14px; }
.dpcheck { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 14px; color: var(--secondary); cursor: pointer; }
.dpcheck input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.dpcheck span { font-size: 12px; line-height: 1.5; }
.dperror { min-height: 20px; margin: 0 0 8px; color: var(--red); }

@media (max-width: 1100px) {
  .dpkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dpdetail-grid, .dpaccess-grid { grid-template-columns: 1fr; }
  .dptools { flex-wrap: wrap; }
  .dptools .dpsearch { width: 100%; flex-basis: 100%; }
}
@media (max-width: 760px) {
  body { display: block; }
  .dpnav { position: static; width: 100%; height: auto; padding: 8px 12px; flex-direction: row; align-items: center; overflow-x: auto; }
  .dpbrand { height: 48px; min-width: max-content; margin: 0 8px 0 0; padding: 0; border: 0; }
  .dpnav-label, .dpnav-spacer, .dpuser { display: none; }
  .dpnav-item { width: auto; min-width: max-content; }
  .dpnav-item b { display: none; }
  main { width: 100%; padding: 24px 16px 48px; }
  .dppage-head { align-items: flex-start; flex-direction: column; }
  .dpkpis { grid-template-columns: 1fr 1fr; }
  .dptools label { width: calc(50% - 4px); }
  .dpfacts, .dpdetail-fields, .dpform-grid { grid-template-columns: 1fr; }
  .dpform-grid .wide { grid-column: auto; }
  .dpmodal { padding: 0; place-items: end center; }
  .dpmodal-card { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
}
