/* PSK Business ERP — styles shared by several modules (documents, line-item editor, profile headers) */

/* profile / detail header used by customer, supplier, vehicle, order and delivery detail views */
.profile-head { display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.profile-head .grow h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-head .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.profile-head .meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.stat-strip > div { padding: 14px 18px; border-right: 1px solid var(--line-2); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip small { display: block; color: var(--muted); font-size: 12px; }
.stat-strip b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* line item editor (sales orders, quotations, purchase orders) */
.lines { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.lines th { padding: 8px 6px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.lines td { padding: 6px 4px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.lines td:first-child, .lines th:first-child { padding-left: 0; }
.lines .input { height: 34px; padding: 0 8px; font-size: 13px; }
.lines .w-prod { min-width: 220px; } .lines .w-qty { width: 86px; } .lines .w-unit { width: 104px; } .lines .w-rate { width: 104px; } .lines .w-pct { width: 70px; }
.lines .line-total { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 13px; white-space: nowrap; }
.lines .line-hint { font-size: 11px; color: var(--muted); margin-top: 3px; }
.lines .line-hint.warn { color: #B45309; font-weight: 600; }
.lines-wrap { overflow-x: auto; margin: 0 -2px; padding: 0 2px; }
.totals { margin-left: auto; width: 100%; max-width: 340px; font-size: 13.5px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; color: var(--text-2); }
.totals div b { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.totals .grand { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 700; color: var(--text); }
.totals .grand b { font-weight: 700; color: var(--primary); }
.doc-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; margin-top: 16px; align-items: start; }

/* printable business document (invoice, quotation, challan, receipt) */
.doc { background: #fff; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 860px; margin: 0 auto; font-size: 12.5px; line-height: 1.5; }
.doc-title { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; gap: 16px; }
.doc-title h2 { font-size: 20px; letter-spacing: .04em; text-transform: uppercase; color: #173B68; }
.doc-title .doc-no { text-align: right; font-size: 12px; color: #475069; }
.doc-title .doc-no b { display: block; font-size: 15px; color: #172033; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.doc-box { border: 1px solid #E4E9F2; border-radius: 8px; padding: 10px 12px; }
.doc-box h5 { margin: 0 0 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #718096; }
.doc-box strong { font-size: 13.5px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-table th { background: #173B68; color: #fff; text-align: left; padding: 7px 8px; font-weight: 600; font-size: 11px; }
.doc-table td { padding: 7px 8px; border-bottom: 1px solid #E4E9F2; vertical-align: top; }
.doc-table .ta-right { text-align: right; font-variant-numeric: tabular-nums; }
.doc-sum { display: grid; grid-template-columns: 1fr 280px; gap: 20px; margin-top: 14px; align-items: start; }
.doc-sum table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-sum td { padding: 4px 8px; }
.doc-sum td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.doc-sum .grand td { border-top: 2px solid #173B68; font-size: 14px; font-weight: 700; padding-top: 8px; }
.doc-words { font-size: 11.5px; color: #475069; margin-top: 8px; }
.doc-terms { margin-top: 16px; font-size: 11px; color: #475069; white-space: pre-line; }
.doc-sign { display: flex; justify-content: space-between; gap: 24px; margin-top: 36px; font-size: 11.5px; color: #475069; }
.doc-sign div { border-top: 1px solid #B6C0D2; padding-top: 6px; min-width: 180px; text-align: center; }
.doc-note { margin-top: 12px; font-size: 10.5px; color: #8592A8; text-align: center; }
@media print { .doc { border: 0; padding: 0; max-width: none; border-radius: 0; } }

/* misc */
.future { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px dashed #C4CDDC; border-radius: var(--radius); background: repeating-linear-gradient(135deg, #FAFBFD, #FAFBFD 10px, #F4F6FA 10px, #F4F6FA 20px); }
.future .tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; background: var(--violet-50); color: #6D28D9; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.future p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row span { color: var(--muted); }
.kv-row b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sig-pad { width: 100%; height: 130px; border: 1px dashed #B6C0D2; border-radius: 10px; background: #FBFCFE; display: block; }
.photo-drop { display: grid; place-items: center; gap: 6px; height: 130px; border: 1px dashed #B6C0D2; border-radius: 10px; background: #FBFCFE; color: var(--muted); font-size: 12.5px; text-align: center; cursor: pointer; overflow: hidden; }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .doc { padding: 16px; }
  .doc-parties, .doc-sum, .doc-foot { grid-template-columns: 1fr; }
  .totals { max-width: none; }
  .stat-strip > div { border-right: 0; border-bottom: 1px solid var(--line-2); }
}
