/* =====================================================================
   DocFlow QC — Dashboard design (index.html ke liye)
   NOTE: ye alag file hai; css/style.css ko chheda nahi gaya, taaki baaki
   pages (entry.html, user_report.html, my_dashboard.html...) pehle jaise
   hi dikhen. Fonts: sirf system fonts (koi external download nahi).
   ===================================================================== */

:root {
  --bg: #eef3fc;
  --card: #ffffff;
  --ink: #0f1f3d;
  --soft: #64748b;
  --line: #e3eaf6;
  --line-strong: #cfd9ec;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --blue-soft: #eaf1ff;
  --navy: #0b1f4d;
  --green: #16a34a;
  --green-soft: #e6f6ec;
  --amber: #f59e0b;
  --amber-soft: #fff4dc;
  --red: #e11d48;
  --red-soft: #ffe8ed;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(30, 58, 138, 0.07);
  --topbar-h: 68px;
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #f6f9ff 0%, #e8effb 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
}
a { color: inherit; }
button { font-family: inherit; }

/* ---------------------------------------------------------------
   TOP BAR
   --------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(30, 58, 138, 0.06);
}
.nav-toggle {
  display: none;
  width: 40px; height: 40px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--navy); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px;
  background: linear-gradient(135deg, #2f6df0, #1e3a8a);
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}
.brand h1 { margin: 0; font-size: 20px; font-weight: 800; color: var(--navy); line-height: 1.1; letter-spacing: -.3px; }
.subtitle { margin: 2px 0 0; font-size: 11.5px; color: var(--soft); white-space: nowrap; }

.global-search { position: relative; flex: 1 1 auto; max-width: 620px; margin-left: 18px; }
.global-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--blue);
}
.global-search input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 72px 0 40px; background: #f6f9ff; font-size: 14px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.global-search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--soft);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 7px; background: #fff;
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  height: 38px; padding: 0 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line-strong); background: #fff; color: var(--blue-dark);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn:hover { background: var(--blue-soft); border-color: var(--blue); }
.btn.primary { background: linear-gradient(90deg, #1e40af, #2563eb); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, .3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: #f3b6c2; color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }

.entry-badge {
  display: none;
  background: var(--blue-soft); border: 1px solid #c9dafc; color: var(--blue-dark);
  font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}

.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #3b82f6, #1e40af); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px; text-transform: uppercase;
}
.user-chip .uname { font-weight: 700; font-size: 13.5px; line-height: 1.15; color: var(--navy); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .urole { font-size: 11.5px; color: var(--soft); }

/* ---------------------------------------------------------------
   SHELL: SIDEBAR + CONTENT
   --------------------------------------------------------------- */
.shell { display: flex; align-items: flex-start; }

.sidebar {
  position: sticky; top: var(--topbar-h);
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  height: calc(100vh - var(--topbar-h));
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, #0f3a9e 0%, #0b2a73 55%, #08204f 100%);
  color: #d6e4ff; overflow-y: auto;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: #cfe0ff; transition: background .15s, color .15s;
}
.nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, #2f6df0, #2563eb); color: #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }

.side-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px; padding: 12px;
}
.side-card h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: #9fc0ff; letter-spacing: .06em; text-transform: uppercase; }
.side-stat { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px; font-size: 13px; color: #e5eeff; }
.side-stat b { font-size: 15px; color: #fff; }
.side-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.side-links a {
  display: block; text-align: center; padding: 8px 10px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28); color: #fff;
}
.side-links a:hover { background: rgba(255, 255, 255, 0.14); }
.side-links a.fill { background: #2f6df0; border-color: #2f6df0; }
.side-note { margin: 10px 2px 0; font-size: 11.5px; color: #9fb8e6; }
.side-note b { color: #fff; font-weight: 600; }

.side-art { margin-top: auto; text-align: center; padding-top: 8px; }
.side-art svg { width: 130px; height: auto; display: block; margin: 0 auto 6px; }
.side-art p { margin: 0; font-size: 13px; font-weight: 700; color: #fff; line-height: 1.35; }

.content { flex: 1 1 auto; min-width: 0; padding: 22px 24px 8px; }
.layout { max-width: 1760px; margin: 0 auto; }

/* ---------------------------------------------------------------
   STAT CARDS
   --------------------------------------------------------------- */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
  display: flex; align-items: center; gap: 16px; min-width: 0;
}
.stat-ic { width: 62px; height: 62px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.stat-ic svg { width: 30px; height: 30px; }
.stat-ic.blue { background: #dbe8ff; color: var(--blue); }
.stat-ic.green { background: var(--green-soft); color: var(--green); }
.stat-ic.amber { background: var(--amber-soft); color: var(--amber); }
.stat-ic.red { background: var(--red-soft); color: var(--red); }
.stat-body { flex: 1 1 auto; min-width: 0; }
.stat-label { font-size: 13.5px; font-weight: 600; color: #3b4a63; }
.stat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stat-big { font-size: 32px; font-weight: 800; color: var(--navy); letter-spacing: -1px; line-height: 1.15; }
.stat-pct { font-size: 13px; font-weight: 700; }
.stat-pct.green { color: var(--green); }
.stat-pct.amber { color: #c98200; }
.stat-pct.red { color: var(--red); }
.stat-sub { font-size: 12px; color: var(--soft); margin-top: 2px; }
.stat-sub.up { color: var(--green); font-weight: 600; }
.bar { height: 7px; border-radius: 999px; background: #e7edf8; margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .4s ease; }
.bar.green > i { background: var(--green); }
.bar.amber > i { background: var(--amber); }
.bar.red > i { background: var(--red); }

/* ---------------------------------------------------------------
   MAIN GRID: DOCUMENTS (left, wide) + QUICK ACTIONS (right)
   --------------------------------------------------------------- */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.right-col { display: flex; flex-direction: column; gap: 20px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.panel h2 { margin: 0 0 14px; font-size: 17px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 9px; }
.panel-icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--blue); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.panel-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-count { font-size: 13px; font-weight: 600; color: var(--soft); }
.scope-note { font-size: 11.5px; font-weight: 500; color: var(--soft); }

.hint { font-size: 12px; color: var(--soft); margin: 10px 0 0; min-height: 16px; }
.hint.tight { margin: 0 0 10px; }

.doc-search {
  height: 38px; width: 230px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 13px; background: #f6f9ff; color: var(--ink); outline: none;
}
.doc-search:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.ghost-btn {
  height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--blue-dark);
  border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ghost-btn svg { width: 15px; height: 15px; }
.ghost-btn:hover { border-color: var(--blue); background: var(--blue-soft); }
.ghost-btn.small { height: auto; padding: 4px 10px; font-size: 11.5px; }

/* Status dropdown + Clear list button (2026-10-27) */
.status-select {
  height: 38px; padding: 0 30px 0 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 13px; font-weight: 600; background: #f6f9ff; color: var(--ink);
  outline: none; cursor: pointer; max-width: 210px;
}
.status-select:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.ghost-btn.danger-outline { color: var(--red); }
.ghost-btn.danger-outline:hover { border-color: var(--red); background: var(--red-soft); }
.ghost-btn:disabled { opacity: .6; cursor: progress; }

.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--soft); flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------------------------------------------------------------
   TABLE
   --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1120px; }

/* FIX (2026-10-10): File column pehle itna patla ho jaata tha ki naam ek-ek akshar
   karke neeche tootta tha. Ab File column ki kam se kam chaudai fixed hai, aur
   baaki saare columns ek line me rehte hain (jagah kam ho to table-wrap ke andar
   hi horizontal scroll hota hai, File column nahi dabta). */
thead th:first-child, tbody td:first-child { min-width: 260px; width: 24%; }
tbody td:not(:first-child) { white-space: nowrap; }
tbody td.empty-row { white-space: normal; }
thead th {
  text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5a6b86;
  padding: 12px 12px; background: #f4f8ff; border-bottom: 1px solid var(--line);
}
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #f5f9ff; }
tbody td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }

.empty-row { text-align: center; color: var(--soft); cursor: default; padding: 30px 0 !important; }
tbody tr:hover .empty-row, .empty-row:hover { background: none !important; }

.filename { position: relative; display: block; padding-left: 32px; margin-bottom: 4px; min-height: 26px; font-weight: 700; color: var(--navy); line-height: 1.35; word-break: normal; overflow-wrap: anywhere; }
.filename::before {
  content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 26px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 26'%3E%3Cpath d='M3 1h11l6 6v16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2z' fill='%23e8344a'/%3E%3Cpath d='M14 1v5a1 1 0 0 0 1 1h5z' fill='%23f7a3ad'/%3E%3Ctext x='11' y='20' text-anchor='middle' font-family='Arial' font-weight='800' font-size='6.5' fill='%23fff'%3EPDF%3C/text%3E%3C/svg%3E");
}
.file-id { display: block; padding-left: 32px; margin-top: 2px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 10.5px; color: #8a96ab; word-break: break-all; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 4px 11px; border-radius: 8px; color: #fff; text-transform: uppercase;
}
.badge.PENDING { background: #94a3b8; }
.badge.PROCESSING { background: var(--amber); }
.badge.DONE { background: var(--green); }
.badge.FAILED { background: var(--red); }

.stage-track { display: flex; gap: 4px; }
.stage-dot { width: 17px; height: 7px; border-radius: 4px; background: #e1e8f4; display: inline-block; }
.stage-dot.filled { background: var(--amber); }
.stage-dot.filled.done { background: var(--green); }
.stage-dot.filled.failed { background: var(--red); }
.stage-dot.skipped {
  background: repeating-linear-gradient(45deg, #e3e7eb, #e3e7eb 3px, #f4f7fa 3px, #f4f7fa 6px);
  border: 1px dashed #b7bfc7;
}

.mode-tag {
  display: inline-block; margin-left: 32px; margin-right: 2px; margin-bottom: 2px; font-size: 10px; font-weight: 700; color: var(--blue-dark);
  background: var(--blue-soft); border: 1px solid #c9dafc; padding: 1px 8px; border-radius: 999px; vertical-align: middle;
}

.mode-tag + .mode-tag { margin-left: 4px; }

.table-foot { margin-top: 12px; font-size: 12.5px; color: var(--soft); }

/* ---------------------------------------------------------------
   QUICK ACTIONS / UPLOAD
   --------------------------------------------------------------- */
.upload-form { display: flex; flex-direction: column; gap: 12px; }
.dropzone {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
  text-align: center; border: 2px dashed #b9cdf5; border-radius: 14px; background: #f5f9ff;
  padding: 24px 12px; cursor: pointer; font-size: 13px; color: var(--soft);
  transition: border-color .15s, background .15s, color .15s;
}
.dropzone svg { width: 34px; height: 34px; color: var(--blue); }
.dropzone:hover { border-color: var(--blue); }
.dropzone.drag { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.dropzone input { display: none; }
.dz-label { word-break: break-word; }

.mode-toggle {
  display: flex; gap: 4px; align-items: center; background: #f1f5fc;
  border: 1px solid var(--line); border-radius: 12px; padding: 4px;
}
.mode-btn {
  flex: 1; border: none; background: none; color: #475a78; font-weight: 700; font-size: 11.5px;
  padding: 9px 6px; border-radius: 9px; cursor: pointer; white-space: nowrap; text-align: center;
  overflow: hidden; text-overflow: ellipsis;
}
.mode-btn:hover { background: #e3ebf9; }
.mode-btn.active { background: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(37, 99, 235, .3); }

#uploadForm button[type="submit"] {
  width: 100%; height: 46px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #1e40af, #2563eb); color: #fff;
  font-size: 15px; font-weight: 700; box-shadow: 0 8px 18px rgba(37, 99, 235, .3);
}
#uploadForm button[type="submit"]:hover { filter: brightness(1.08); }
#uploadForm button[disabled] { background: #94a3b8; box-shadow: none; cursor: default; filter: none; }

.divider { height: 1px; background: var(--line); border: none; margin: 16px 0; }
.fw-title { margin: 0 0 8px; font-size: 14.5px; font-weight: 800; color: var(--navy); }
.fw-title .hint { display: inline; font-weight: 500; margin: 0 0 0 4px; }
#folderWatchSection button {
  height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--blue-dark); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
#folderWatchSection button:hover { background: var(--blue-soft); border-color: var(--blue); }
#fwControls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------
   PIPELINE STRIP
   --------------------------------------------------------------- */
.pipeline-strip { margin: 20px 0 0; }
.pipeline-head h2 { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: var(--navy); }
.pipeline-head .hint { margin: 0 0 14px; font-size: 12.5px; }
.pipeline-track {
  display: flex; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 28px;
}
.pipeline-node { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; }
.pipeline-num {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #3b82f6, #1e40af);
  box-shadow: 0 6px 12px rgba(37, 99, 235, .3);
}
.pipeline-label { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.pipeline-label small { display: block; font-weight: 500; color: var(--soft); font-size: 11px; margin-top: 1px; }
.pipeline-connector { flex: 0 0 56px; height: 2px; background: linear-gradient(90deg, #c9dafc, #93b4f5); margin: 0 2px 26px; border-radius: 2px; }

.app-footer { margin: 22px 0 18px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--soft); }

/* ---------------------------------------------------------------
   DOCUMENT DETAIL MODAL
   --------------------------------------------------------------- */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(11, 31, 77, 0.5);
  align-items: center; justify-content: center; z-index: 1000; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  position: relative; background: #fff; width: 680px; max-width: 100%; max-height: 88vh;
  border-radius: 18px; padding: 28px 30px; overflow-y: auto; box-shadow: 0 24px 60px rgba(11, 31, 77, 0.35);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; border: none; background: none; font-size: 24px; line-height: 1;
  color: var(--soft); cursor: pointer; padding: 4px 10px; border-radius: 8px;
}
.modal-close:hover { background: #eef3fc; color: var(--ink); }
#modalTitle { font-size: 20px; font-weight: 800; color: var(--navy); margin: 0 30px 18px 0; word-break: break-word; }
.modal-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px;
  margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.modal-grid > div { display: flex; flex-direction: column; gap: 2px; }
.modal-grid .label { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.modal-grid .value { font-size: 13.5px; font-weight: 700; color: var(--navy); word-break: break-word; }
.ocr-heading { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 800; color: var(--navy); margin: 0 0 10px; }
.ocr-text {
  background: #f5f8fe; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow-y: auto; margin: 0;
}

/* ---------------------------------------------------------------
   FILE PICKER MODAL ("Select File")
   --------------------------------------------------------------- */
.picker-overlay {
  display: none; position: fixed; inset: 0; background: rgba(11, 31, 77, 0.5);
  align-items: center; justify-content: center; z-index: 1000;
}
.picker-overlay.open { display: flex; }
.picker-box {
  background: #fff; width: 500px; max-width: 92vw; max-height: 80vh; border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(11, 31, 77, 0.35);
}
.picker-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.picker-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--navy); }
.picker-close { border: none; background: none; font-size: 22px; color: var(--soft); padding: 0 4px; cursor: pointer; }
.picker-search { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.picker-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 13px; background: #f6f9ff; outline: none; }
.picker-search input:focus { border-color: var(--blue); background: #fff; }
.picker-list { overflow-y: auto; flex: 1; }
.picker-item { padding: 12px 20px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.picker-item:hover { background: #f4f8ff; }
.picker-item .pname { font-weight: 700; color: var(--navy); word-break: break-word; }
.picker-item .pmeta { display: flex; gap: 8px; align-items: center; margin-top: 5px; color: var(--soft); font-size: 11.5px; }
.picker-item .phidden-tag { font-size: 10px; color: #a06a00; background: var(--amber-soft); border: 1px solid #f1dba5; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.picker-empty { padding: 26px 20px; color: var(--soft); font-size: 13px; text-align: center; }

/* ---------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1360px) {
  .content-grid { grid-template-columns: 1fr; }
  .right-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
@media (max-width: 1180px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search { display: none; }
  .subtitle { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; left: -260px; top: var(--topbar-h); bottom: 0; height: auto; z-index: 55;
    transition: left .2s ease; box-shadow: 8px 0 30px rgba(0, 0, 0, .25);
  }
  body.nav-open .sidebar { left: 0; }
  .content { padding: 16px 14px 8px; }
  .user-chip .uname, .user-chip .urole { display: none; }
  .user-chip { padding-left: 8px; }
  .btn .btn-text { display: none; }
  .pipeline-track { flex-direction: column; align-items: stretch; padding: 18px; }
  .pipeline-node { flex-direction: row; justify-content: flex-start; text-align: left; }
  .pipeline-connector { width: 2px; height: 18px; flex-basis: 18px; margin: 0 0 0 16px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand h1 { font-size: 17px; }
  .stats-row { grid-template-columns: 1fr; gap: 12px; }
  .doc-search, .status-select { width: 100%; max-width: none; }
  .panel { padding: 14px; }
  .panel-tools { width: 100%; }
  .modal { padding: 22px 18px; }
  .modal-grid { grid-template-columns: 1fr; }
}
