/* ══════════════════════════════════════════════════════════════════
   Document Hub — Module Styles
   ══════════════════════════════════════════════════════════════════ */

/* ── Type tags ─────────────────────────────────────────────────── */
.type-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.type-MEMO { background: #dbeafe; color: #1d4ed8; }
.type-CIR  { background: #dcfce7; color: #16a34a; }
.type-AO   { background: #fef3c7; color: #b45309; }
.type-SO   { background: #fce7f3; color: #be185d; }
.type-PD   { background: #e0e7ff; color: #4338ca; }
.type-BCN  { background: #f3e8ff; color: #7c3aed; }
.type-JO   { background: #fecaca; color: #dc2626; }
.type-JC   { background: #fed7aa; color: #ea580c; }

/* ── Table enhancements ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.data-table th.filterable {
  position: relative;
  cursor: default;
}
.filter-icon {
  cursor: pointer;
  font-size: 9px;
  opacity: .5;
  margin-left: 4px;
  transition: opacity .15s;
}
.filter-icon:hover { opacity: 1; }

/* ── Column filter dropdown ────────────────────────────────────── */
.col-filter {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 0;
}
.col-filter.open { display: block; }
.col-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  color: var(--text);
}
.col-filter label:hover { background: var(--bg); }
.col-filter .filter-divider {
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ── File upload area ──────────────────────────────────────────── */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.file-upload-area:hover,
.file-upload-area.has-file {
  border-color: var(--primary);
}
.file-upload-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
}
.file-upload-area.has-file .file-upload-label {
  color: var(--primary);
  font-weight: 600;
}

/* ── Checkbox label ────────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  cursor: pointer;
}

/* ── Sign link box ─────────────────────────────────────────────── */
.sign-link-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
}

/* ── Signature badges ──────────────────────────────────────────── */
.sig-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.sig-count.has-sigs { background: #dcfce7; color: #16a34a; }
.sig-count.no-sigs  { background: #f1f5f9; color: #94a3b8; }

/* ── PDF link button ───────────────────────────────────────────── */
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  transition: all .15s;
}
.pdf-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ── Copy link button ──────────────────────────────────────────── */
.sign-link-btn {
  font-size: 11px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
}

/* ── Form row ──────────────────────────────────────────────────── */
.form-row {
  display: flex;
  gap: 16px;
}
@media (max-width: 500px) {
  .form-row { flex-direction: column; gap: 0; }
}

/* ── Actions cell ─────────────────────────────────────────────── */
.actions-cell {
  white-space: nowrap;
}
.actions-cell .btn { margin-right: 4px; }
.actions-cell .btn:last-child { margin-right: 0; }

/* ── Regenerate PDF button ────────────────────────────────────── */
.regen-btn {
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
}
.regen-btn:hover {
  background: var(--primary-xlight, #e8f4f6) !important;
}

/* ── Signed PDF button ────────────────────────────────────────── */
.signed-pdf-btn {
  background: var(--success, #16a34a) !important;
  color: #fff !important;
  border: none !important;
  text-decoration: none;
}
.signed-pdf-btn:hover {
  opacity: .9;
}
