/* ===== pages.css — PROFFBankrot Dashboard Page-Specific Styles ===== */

/* Deal Panel Header */
.dp-header { margin-bottom: 16px; }
.dp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 100px; margin-bottom: 8px; }
.dp-status-green { background: var(--green-l); color: #065f46; }
.dp-status-red { background: var(--red-l); color: var(--red); }
.dp-status-blue { background: var(--blue-l); color: var(--blue); }
.dp-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; }
.dp-stage { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.dp-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-meta-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--border2); color: var(--text2); }
.dp-meta-return { background: var(--purple-l); color: var(--purple); }

/* CRM Button */
.dp-crm-btn { display: block; text-align: center; padding: 10px; border-radius: 8px; background: var(--accent); color: white; text-decoration: none; font-size: 13px; font-weight: 600; margin-bottom: 16px; transition: background 0.15s; }
.dp-crm-btn:hover { background: var(--accent-h); }

/* Sections */
.dp-section { margin-bottom: 16px; padding: 14px; border: 1px solid var(--border2); border-radius: var(--r); }
.dp-section-danger { border-color: var(--red-b); background: var(--red-l); }
.dp-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dp-section-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.dp-section-title { font-size: 13px; font-weight: 700; }
.dp-section-badge { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--border2); color: var(--text2); }

/* Rows */
.dp-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border2); font-size: 13px; }
.dp-row:last-child { border-bottom: none; }
.dp-row-label { color: var(--text2); display: flex; align-items: center; gap: 6px; }
.dp-row-icon { font-size: 14px; }
.dp-row-value { font-weight: 600; text-align: right; }
.dp-row-accent { color: var(--accent); }
.dp-row-warn { color: var(--yellow); }
.dp-row-danger { color: var(--red); }

/* Qualification Grid */
.dp-qual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dp-qual-item { padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.dp-qual-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }
.dp-qual-value { font-size: 13px; font-weight: 600; }

/* UTM Grid */
.dp-utm-grid { display: flex; flex-direction: column; gap: 4px; }
.dp-utm-item { display: flex; gap: 8px; font-size: 12px; padding: 4px 0; }
.dp-utm-key { color: var(--muted); font-weight: 600; min-width: 70px; }
.dp-utm-val { color: var(--text); word-break: break-all; }

/* GDS Timeline */
.dp-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.dp-tl-item { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.dp-tl-item:not(.dp-tl-last)::after { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.dp-tl-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-l); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; z-index: 1; }
.dp-tl-neg .dp-tl-dot { background: var(--red-l); color: var(--red); }
.dp-tl-content { flex: 1; }
.dp-tl-label { font-size: 13px; font-weight: 600; }
.dp-tl-date { font-size: 11px; color: var(--muted); }

/* Payments */
.dp-pay-bar { height: 8px; background: var(--border2); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.dp-pay-bar-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width 0.5s ease; }
.dp-pay-list { display: flex; flex-direction: column; gap: 4px; }
.dp-pay-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 6px; background: var(--green-l); }
.dp-pay-n { font-size: 12px; font-weight: 600; color: #065f46; }
.dp-pay-date { font-size: 12px; color: var(--text2); }
.dp-empty-hint { font-size: 12px; color: var(--muted); text-align: center; padding: 12px; }

/* Invoices (NEW) */
.dp-inv-list { display: flex; flex-direction: column; gap: 6px; }
.dp-inv-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border2); }
.dp-inv-item.paid { background: var(--green-l); border-color: var(--green-b); }
.dp-inv-item.partial { background: var(--yellow-l); border-color: var(--yellow-b); }
.dp-inv-item.pending { background: var(--border2); }
.dp-inv-left { display: flex; flex-direction: column; gap: 2px; }
.dp-inv-num { font-size: 12px; font-weight: 600; }
.dp-inv-date { font-size: 11px; color: var(--muted); }
.dp-inv-right { text-align: right; }
.dp-inv-price { font-size: 14px; font-weight: 700; }
.dp-inv-status { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }

/* Quality bar */
.dp-quality { display: flex; align-items: center; gap: 12px; }
.dp-quality-bar { flex: 1; height: 8px; background: var(--border2); border-radius: 4px; overflow: hidden; }
.dp-quality-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.dp-quality-pct { font-size: 16px; font-weight: 800; }

/* KAD link */
.dp-kad-link { display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 6px; background: var(--purple-l); color: var(--purple); text-decoration: none; font-size: 12px; font-weight: 600; }
.dp-kad-link:hover { background: var(--purple); color: white; }

/* Conversion waterfall */
.conv-waterfall { display: flex; flex-direction: column; gap: 4px; }
.conv-wf-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.conv-wf-label { width: 130px; font-size: 12px; font-weight: 500; color: var(--text2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.conv-wf-bar { flex: 1; height: 28px; background: var(--border2); border-radius: 6px; overflow: hidden; position: relative; }
.conv-wf-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; transition: width 0.5s ease; }
.conv-wf-pct { font-size: 11px; font-weight: 700; color: white; }
.conv-wf-count { width: 50px; text-align: right; font-size: 12px; font-weight: 600; color: var(--text2); flex-shrink: 0; }
