/**
 * @module dashboard-documents
 * @description Documents tab styles: document card layout, priority badge, signed status,
 * review-and-sign button, document viewer with scroll progress bar, signature form,
 * consent checkbox, and payment section rows.
 */

/* ── Documents Tab ────────────────────────────────── */
.doc-card {
  margin-bottom: 1rem;
}

.doc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.doc-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-priority-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(239,68,68,0.1);
  color: #b91c1c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.doc-status-signed {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}

.doc-sign-btn {
  padding: 0.35rem 0.85rem;
  background: var(--teal);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.doc-sign-btn:hover { background: var(--teal-lt); }

.doc-viewer-wrap {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.doc-scroll-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.doc-scroll-bar {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  width: 0%;
  transition: width 0.15s;
}

.doc-content {
  height: 400px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.doc-sign-section {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(13,148,136,0.05);
  border: 1px solid rgba(13,148,136,0.2);
  border-radius: var(--radius);
}

.doc-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.doc-consent-label input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.doc-sign-name-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  margin-top: 0.75rem;
}

.doc-sign-name-input:focus { border-color: var(--teal); }

.doc-sign-submit-btn {
  margin-top: 0.75rem;
  padding: 0.55rem 1.25rem;
  background: var(--teal);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.doc-sign-submit-btn:hover:not(:disabled) { background: var(--teal-lt); }
.doc-sign-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Payment Section ──────────────────────────────── */
.payment-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.payment-info-row:last-of-type { border-bottom: none; }

.payment-info-label { color: var(--text-muted); }
.payment-info-value { color: var(--text); font-weight: 500; }

.payment-complete-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 1.5rem;
  background: var(--teal);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.payment-complete-btn:hover { background: var(--teal-lt); }
