/* ================================================================
   Shared Detail Panel — Used by ERP and CRM for detail views
   Slide-in panel, detail rows, section headers, timeline
   ================================================================ */

/* Detail view (replaces list content in module area) */
.detail-view { max-width: 800px; }

.detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--app-accent); cursor: pointer;
  background: none; border: none; margin-bottom: 16px; padding: 0;
}
.detail-back:hover { text-decoration: underline; }

.detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; gap: 16px;
}
.detail-header__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.detail-header__sub { font-size: 0.85rem; color: var(--app-text-2); margin-top: 4px; }

/* Key-value rows */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 24px;
}
.detail-field { display: flex; flex-direction: column; gap: 2px; }
.detail-field__label { font-size: 0.75rem; font-weight: 500; color: var(--app-text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-field__value { font-size: 0.9rem; color: var(--app-text-1); }

/* Sections within detail view */
.detail-section { margin-top: 24px; }
.detail-section__title {
  font-size: 0.82rem; font-weight: 600; color: var(--app-accent);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding-bottom: 8px; border-bottom: 1px solid var(--app-border);
  margin-bottom: 12px;
}

/* Timeline (activity history) */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { display: flex; gap: 12px; font-size: 0.85rem; }
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--app-accent); margin-top: 5px; flex-shrink: 0;
}
.timeline-content { flex: 1; }
.timeline-date { font-size: 0.75rem; color: var(--app-text-3); margin-bottom: 2px; }
.timeline-text { color: var(--app-text-1); line-height: 1.45; }

/* Positions table (quotes/invoices) */
.positions-table { margin-top: 12px; }
.positions-table th { font-size: 0.72rem; }
.positions-total {
  display: flex; justify-content: flex-end; gap: 24px;
  padding: 12px 14px; border-top: 2px solid var(--app-border);
  font-weight: 600;
}
.positions-total__label { color: var(--app-text-2); }
.positions-total__value { font-family: var(--font-mono); color: var(--app-text-1); }

/* Notes input */
.detail-notes { margin-top: 12px; }
.detail-notes textarea {
  width: 100%; padding: 10px; font-size: 0.85rem;
  background: rgba(255,255,255,0.04); border: 1px solid var(--app-border);
  border-radius: var(--radius-xs); color: var(--app-text-1); resize: none;
}
.detail-notes textarea:focus { border-color: var(--app-accent); outline: none; }
.detail-notes__btn {
  margin-top: 8px; padding: 5px 14px; font-size: 0.78rem;
  background: var(--app-accent); color: #fff; border-radius: var(--radius-xs);
  cursor: pointer; border: none;
}

/* Progress bar */
.progress-bar {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden;
}
.progress-bar__fill {
  height: 100%; border-radius: 3px; background: var(--app-accent);
  transition: width 0.3s ease;
}

/* Status filter pills */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  padding: 4px 12px; border-radius: 99px; font-size: 0.78rem; font-weight: 500;
  border: 1px solid var(--app-border); color: var(--app-text-2);
  cursor: pointer; transition: all var(--transition-fast); background: none;
}
.filter-pill:hover { border-color: var(--app-accent); color: var(--app-accent); }
.filter-pill.active { background: var(--app-accent-light); border-color: var(--app-accent); color: var(--app-accent); }
