/**
 * CTS dashboards — minimal, function-first styling for the shipper and provider
 * dashboards. Intentionally light; the dedicated styling phase themes this later.
 *
 * @package CTS
 */

.cts-dashboard { max-width: 920px; margin: 0 auto; }
.cts-dashboard h1 { margin-bottom: .25rem; }
.cts-muted { color: #6b7280; }
.cts-rule { border: 0; border-top: 1px solid #e5e7eb; margin: 1.75rem 0; }

/* Head + tabs */
.cts-dash-head { margin-bottom: 1.25rem; }
.cts-dash-links a { margin: 0 .15rem; }
.cts-dash-tabs, .cts-lead-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid #e5e7eb; margin: 1rem 0; }
.cts-dash-tabs a, .cts-lead-tabs a {
	padding: .5rem .9rem; text-decoration: none; color: #374151;
	border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0;
}
.cts-dash-tabs a.is-active, .cts-lead-tabs a.is-active {
	background: #fff; border-color: #e5e7eb; font-weight: 600; color: #111827;
	margin-bottom: -1px;
}
.cts-lead-tabs .cts-count { color: #6b7280; font-weight: 400; }

/* Notices */
.cts-notice { padding: .75rem 1rem; border-radius: 4px; margin: 1rem 0; border: 1px solid transparent; }
.cts-notice.cts-success { background: #e6f4ea; border-color: #b7dfc2; color: #14532d; }
.cts-notice.cts-error { background: #fdecea; border-color: #f5b5ae; color: #842029; }
.cts-note { padding: .75rem 1rem; background: #f4f6f8; border-radius: 4px; margin: 1rem 0; }
.cts-note.cts-error { background: #fdecea; }

/* Cards */
.cts-enquiry-card, .cts-lead-card {
	border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem 1.25rem;
	margin: 1rem 0; background: #fff;
}
.cts-enquiry-head, .cts-lead-head {
	display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.cts-enquiry-head h2, .cts-lead-head h2 { margin: 0; font-size: 1.15rem; }
.cts-enquiry-meta, .cts-lead-meta { margin: .2rem 0 0; color: #6b7280; font-size: .88rem; }
.cts-enquiry-summary { margin: .75rem 0; }
.cts-enquiry-card h3, .cts-lead-card h3 { font-size: .95rem; margin: 1rem 0 .4rem; }

/* Status pills */
.cts-status {
	display: inline-block; padding: .15rem .55rem; border-radius: 999px;
	font-size: .78rem; font-weight: 600; background: #eef2ff; color: #3730a3; white-space: nowrap;
}
.cts-status-new, .cts-status-routed, .cts-status-proposed { background: #eff6ff; color: #1e40af; }
.cts-status-viewed { background: #fef9c3; color: #854d0e; }
.cts-status-responded, .cts-status-shortlisted, .cts-status-in_conversation { background: #e0f2fe; color: #075985; }
.cts-status-verified, .cts-status-won, .cts-status-active { background: #dcfce7; color: #166534; }
.cts-status-declined, .cts-status-lost, .cts-status-failed, .cts-status-suspended, .cts-status-spam { background: #fee2e2; color: #991b1b; }
.cts-status-pending, .cts-status-pending_review, .cts-status-expired, .cts-status-draft, .cts-status-unverified { background: #f3f4f6; color: #374151; }

/* Matches list (shipper) */
.cts-match-list { list-style: none; margin: 0; padding: 0; }
.cts-match-row { display: flex; align-items: center; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid #f3f4f6; flex-wrap: wrap; }
.cts-match-name { font-weight: 600; }

/* Brief definition list (provider lead) */
.cts-brief { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .9rem; margin: .75rem 0; }
.cts-brief dt { font-weight: 600; color: #374151; }
.cts-brief dd { margin: 0; }

/* Contact gating block */
.cts-contact-block { border-radius: 6px; padding: .75rem 1rem; margin: .75rem 0; }
.cts-contact-block.is-locked { background: #f9fafb; border: 1px dashed #cbd5e1; }
.cts-contact-block.is-unlocked { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cts-locked-note { margin: 0; color: #6b7280; }
.cts-lock { margin-right: .35rem; }

/* Lead actions */
.cts-lead-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.cts-inline-form { display: inline; margin: 0; }
.cts-btn { display: inline-block; padding: .5rem .9rem; border-radius: 6px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; font: inherit; text-decoration: none; }
.cts-btn-primary { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.cts-btn-ghost { color: #374151; }

/* Thread links + unread badge */
.cts-thread-link { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.cts-badge { background: #dc2626; color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .4rem; line-height: 1.4; min-width: 1.1rem; text-align: center; }

/* Status tiles + completeness meter (provider profile) */
.cts-status-tiles, .cts-analytics-grid { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.cts-tile { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: .8rem 1rem; min-width: 140px; }
.cts-tile-label { display: block; color: #6b7280; font-size: .82rem; margin-top: .3rem; }
.cts-stat-num { font-size: 1.8rem; font-weight: 700; }
.cts-meter { background: #e5e7eb; border-radius: 999px; height: 12px; overflow: hidden; margin: 1rem 0 .35rem; }
.cts-meter-bar { background: #16a34a; height: 100%; }
.cts-meter-label { margin: 0; color: #374151; font-size: .9rem; }

/* Resources box (shipper) */
.cts-resources-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem 1.25rem; margin-top: 1.5rem; }
.cts-resources-box h3 { margin-top: 0; }
.cts-resources-box ul { margin: .5rem 0 0; padding-left: 1.1rem; }

/* Pagination */
.cts-pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.5rem 0; }
