/* Federal Cases — Forensic Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0c0c12; color: #e1d9eb; font-family: 'IBM Plex Sans', system-ui, sans-serif; min-height: 100vh; }

/* ═══ HEADER ═══ */
.site-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 30px; background: #111119; border-bottom: 2px solid #3a3a50;
}
.site-bar a { text-decoration: none; }
.bar-brand { font-family: 'IBM Plex Mono', monospace; font-size: 16px; font-weight: 700; color: #ff5545; letter-spacing: 5px; }
.bar-sep { color: #3a3a50; font-size: 18px; }
.bar-section { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #b0b0b0; letter-spacing: 2px; text-transform: uppercase; }
.bar-nav { margin-left: auto; display: flex; gap: 12px; }
.bar-link { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #a0a0a0; letter-spacing: 1px; text-decoration: none; padding: 6px 14px; border: 1px solid #3a3a50; border-radius: 4px; transition: all 0.2s; }
.bar-link:hover { color: #fff; border-color: #ff5545; background: #ff554515; }

/* ═══ PAGE LAYOUT ═══ */
.page { max-width: 1400px; margin: 0 auto; padding: 30px; }
.page-title { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.page-subtitle { font-size: 15px; color: #b0b0b0; line-height: 1.7; margin-bottom: 24px; max-width: 960px; }
.page-subtitle strong { color: #ffb732; }

/* ═══ CASE PAIR ═══ */
.case-pair { margin-bottom: 30px; }
.pair-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: #b0b0b0;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid #3a3a50;
}
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ═══ CASE CARD (landing page) ═══ */
.case-card {
  display: block; text-decoration: none; color: inherit;
  background: #111119; border: 2px solid #4a4a60; border-radius: 10px;
  padding: 24px 28px; transition: all 0.2s;
}
.case-card:hover { border-color: #3a86ba; background: #161622; box-shadow: 0 0 16px #3a86ba20; }
.case-card.appeal { border-left: 4px solid #b990e6; }
.case-card.appeal:hover { border-color: #b990e6; box-shadow: 0 0 16px #b990e620; }
.case-card.district { border-left: 4px solid #3a86ba; }
.cc-court { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #b0b0b0; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.cc-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.cc-number { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: #3a86ba; margin-bottom: 12px; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: #b0b0b0; }
.cc-meta span { display: flex; align-items: center; gap: 5px; }
.cc-meta .val { color: #e0dce8; font-weight: 600; }
.cc-meta .status-open { color: #4eecc8; }
.cc-meta .status-closed { color: #a0a0a0; }
.cc-cl {
  display: inline-block; margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #3a86ba;
  border: 1px solid #3a86ba; border-radius: 4px; padding: 5px 14px; letter-spacing: 1px;
  transition: all 0.2s;
}
.cc-cl:hover { background: #3a86ba15; color: #fff; }

/* ═══ DOWNLOAD SECTION ═══ */
.dl-section { margin-top: 20px; padding-top: 20px; border-top: 2px solid #3a3a50; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.dl-card {
  background: #0e0e16; border: 1px solid #3a3a50; border-radius: 6px; padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.dl-card-title { font-size: 14px; font-weight: 600; color: #b0b0b0; }
.dl-card-num { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #8a8494; }
.dl-card-meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #8a8494; display: flex; gap: 12px; }
.dl-card-meta .sz { color: #ff5545; font-weight: 600; }
.dl-card-hash { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #5a566a; word-break: break-all; }
.dl-card-btn {
  display: inline-block; margin-top: 4px; font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; color: #4eecc8; border: 1px solid #4eecc850; border-radius: 3px;
  padding: 3px 10px; text-decoration: none; letter-spacing: 1px; transition: all 0.2s;
  align-self: flex-start;
}
.dl-card-btn:hover { background: #4eecc815; border-color: #4eecc8; }

/* ═══ DOCKET VIEWER PAGE ═══ */
.docket-page { display: flex; flex-direction: column; height: calc(100vh - 50px); overflow: hidden; }

/* Case header bar */
.case-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: #111119; border-bottom: 1px solid #3a3a50; flex-shrink: 0;
}
.cb-title { font-size: 16px; font-weight: 600; color: #fff; }
.cb-number { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: #3a86ba; }
.cb-court { font-size: 12px; color: #a0a0a0; }
.cb-badge {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 2px 8px;
  border-radius: 3px; letter-spacing: 1px;
}
.cb-badge.open { background: #4eecc815; color: #4eecc8; }
.cb-badge.closed { background: #70707015; color: #707070; }
.cb-cl {
  margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  color: #3a86ba; text-decoration: none; border: 1px solid #3a86ba; border-radius: 4px;
  padding: 4px 12px; letter-spacing: 1px; transition: all 0.2s;
}
.cb-cl:hover { background: #3a86ba15; color: #fff; }

/* Split layout */
.docket-split { display: flex; flex: 1; overflow: hidden; }

/* Left: docket entries */
.docket-list {
  width: 50%; min-width: 300px; overflow-y: auto; overflow-x: hidden;
  border-right: 1px solid #3a3a50; background: #0c0c12;
}

/* Splitter */
.docket-divider {
  width: 6px; cursor: col-resize; flex-shrink: 0;
  background: #1a1a28; border-left: 1px solid #3a3a50; border-right: 1px solid #3a3a50;
  transition: background 0.15s;
}
.docket-divider:hover, .docket-divider.dragging { background: #ff5545; }

/* Right: PDF viewer */
.docket-viewer { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dv-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; background: #111119; border-bottom: 1px solid #3a3a50; flex-shrink: 0;
}
.dv-title {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #ffb732;
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dv-dl {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #4eecc8;
  text-decoration: none; border: 1px solid #4eecc8; border-radius: 3px;
  padding: 3px 10px; letter-spacing: 1px; transition: all 0.2s; flex-shrink: 0;
}
.dv-dl:hover { background: #4eecc815; }
.dv-embed { flex: 1; border: none; width: 100%; }
.dv-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: #3a3a50; font-size: 14px; font-family: 'IBM Plex Mono', monospace;
}

/* ═══ DOCKET ENTRY CARDS ═══ */
.docket-list { padding: 10px; }
.entry-card {
  padding: 14px 18px; margin-bottom: 8px; cursor: pointer;
  background: #111119; border: 1px solid #2a2a3c; border-radius: 8px;
  transition: all 0.15s;
}
.entry-card:hover { background: #1a1a28; border-color: #4a4a60; }
.entry-card.active {
  background: #1a1a2e; border: 2px solid #ff5545;
  box-shadow: 0 0 12px #ff554530;
}
.entry-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.entry-num {
  font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 700;
  color: #ff5545; min-width: 36px;
}
.entry-date {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: #e1d9eb; font-weight: 600;
}
.entry-cat {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 4px; text-transform: uppercase; font-weight: 600;
  background: #3a86ba20; color: #3a86ba; border: 1px solid #3a86ba40;
}
.entry-cat.motion { background: #ffb73220; color: #ffb732; border-color: #ffb73240; }
.entry-cat.order { background: #4eecc820; color: #4eecc8; border-color: #4eecc840; }
.entry-cat.complaint { background: #ff554520; color: #ff5545; border-color: #ff554540; }
.entry-cat.clerk { background: #b990e620; color: #b990e6; border-color: #b990e640; }
.entry-desc {
  font-size: 14px; color: #c0bcc8; line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.entry-card.active .entry-desc { -webkit-line-clamp: unset; color: #e1d9eb; }

/* Child document cards (attachments) — indented under parent */
.entry-child {
  margin-left: 36px; padding: 10px 14px;
  background: #0e0e18; border-color: #252535;
}
.entry-child:hover { background: #151524; border-color: #3a3a50; }
.entry-child.active { background: #1a1a2e; border: 2px solid #ffb732; box-shadow: 0 0 10px #ffb73225; }
.entry-child .entry-date { font-size: 12px; color: #b0b0b0; font-weight: 500; }
.entry-child .entry-links { display: block; margin-top: 6px; }

/* Links dropdown */
.entry-links {
  display: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a2a3c;
}
.entry-card.active .entry-links { display: block; }
.entry-link {
  display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  color: #3a86ba; text-decoration: none; margin-right: 12px; margin-bottom: 4px;
  padding: 2px 8px; border: 1px solid #3a3a50; border-radius: 3px;
  transition: all 0.2s; letter-spacing: 0.5px;
}
.entry-link:hover { border-color: #3a86ba; background: #3a86ba15; }
.entry-link.local { color: #4eecc8; border-color: #4eecc850; }
.entry-link.local:hover { border-color: #4eecc8; background: #4eecc815; }

/* ═══ PROVENANCE SECTION ═══ */
.prov-section {
  padding: 16px 18px; border-top: 2px solid #3a3a50; background: #111119;
}
.prov-toggle {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #8a8494;
  letter-spacing: 2px; cursor: pointer; user-select: none;
}
.prov-body { display: none; margin-top: 12px; }
.prov-section.open .prov-body { display: block; }
.prov-file {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #707070;
  padding: 3px 0;
}
.prov-file a { color: #3a86ba; text-decoration: none; }
.prov-file a:hover { text-decoration: underline; }

/* ═══ FOOTER ═══ */
.page-footer {
  text-align: center; padding: 30px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #707070;
  letter-spacing: 2px; border-top: 2px solid #3a3a50; margin-top: 20px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .pair-grid, .dl-grid { grid-template-columns: 1fr; }
  .docket-split { flex-direction: column; }
  .docket-list { width: 100%; height: 40%; }
  .docket-divider { display: none; }
  .bar-nav { display: none; }
}

/* ═══ DRAG OVERLAY ═══ */
.drag-overlay { display: none; position: fixed; inset: 0; z-index: 50; }
.drag-overlay.active { display: block; }
body.dragging-active embed,
body.dragging-active iframe,
body.dragging-active object {
  pointer-events: none !important;
}
