/* ════════════════════════════════════════════
   The Holidave — Team Dashboard
   template-dashboard.php / dashboard.css

   Only adds what template-itinerary-builder.php's existing
   itinerary-builder.css doesn't already cover (tab bar + the
   leads/CRM table). All itb-* classes (buttons, cards, gate,
   hero, list view, builder form) are untouched and keep using
   itinerary-builder.css as-is.
═══════════════════════════════════════════════ */

/* ─── TAB BAR ─── */
.dash-tabs { display: flex; gap: 6px; border-bottom: 2px solid #E2E2DE; margin: 0 0 1.75rem; }
.dash-tab { display: flex; align-items: center; gap: 8px; background: none; border: none; border-bottom: 3px solid transparent; padding: 12px 4px; margin-bottom: -2px; font-size: 14.5px; font-weight: 700; color: #767676; cursor: pointer; transition: color .15s, border-color .15s; }
.dash-tab:hover { color: #0a5b66; }
.dash-tab i { font-size: 13px; }
.dash-tab-active, .dash-tab-active:hover { color: #0a5b66; border-bottom-color: #FB5B32; }

.dash-panel { min-width: 0; }

/* ─── LEADS TOOLBAR ─── */
.dash-leads-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 1.25rem; }
.dash-leads-filters { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.dash-leads-filters select,
.dash-leads-filters input[type="search"] { border: 1.5px solid #E2E2DE; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; font-family: inherit; color: #111; outline: none; background: #fff; }
.dash-leads-filters select:focus,
.dash-leads-filters input[type="search"]:focus { border-color: #0a5b66; }
.dash-leads-filters input[type="search"] { flex: 1; min-width: 200px; }

/* ─── LEADS TABLE ─── */
.dash-leads-table-wrap { background: #fff; border-radius: 12px; border: 1px solid #E2E2DE; overflow-x: auto; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.dash-leads-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.dash-leads-table thead th { background: #0a5b66; color: #fff; text-align: left; font-weight: 700; padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.dash-leads-table thead th:first-child { border-top-left-radius: 12px; }
.dash-leads-table thead th:last-child { border-top-right-radius: 12px; }
.dash-leads-table td { padding: 12px 16px; border-bottom: 1px solid #EFEFED; vertical-align: middle; color: #333; }
.dash-leads-table tbody tr:last-child td { border-bottom: none; }
.dash-leads-table tbody tr:hover td { background: #FAFAF8; }
.dash-leads-table a { color: #0a5b66; text-decoration: none; }
.dash-leads-table a:hover { text-decoration: underline; }
.dash-leads-date { white-space: nowrap; color: #767676; font-size: 12.5px; }
.dash-leads-contact { font-size: 12.5px; line-height: 1.6; }
.dash-leads-loading, .dash-leads-empty { text-align: center; padding: 2.5rem 1rem !important; color: #888; }

/* ─── STATUS DROPDOWN — colour reflects current status ─── */
.dash-status-select { border: 1.5px solid #E2E2DE; border-radius: 99px; padding: 6px 28px 6px 12px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; outline: none; appearance: none; background-repeat: no-repeat; background-position: right 10px center; background-size: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23767676' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); }
.dash-status-new       { background-color: #E3F2F4; color: #0a5b66; border-color: #bfe0e4; }
.dash-status-contacted { background-color: #FFF4E0; color: #a3690b; border-color: #ffe2ab; }
.dash-status-quoted    { background-color: #EFE7FB; color: #6a3fc4; border-color: #ddceF7; }
.dash-status-follow_up { background-color: #FFF1EC; color: #FB5B32; border-color: #ffd8cb; }
.dash-status-won        { background-color: #E7F7EC; color: #1c8a44; border-color: #c8ecd4; }
.dash-status-lost       { background-color: #FBEAEA; color: #b3312d; border-color: #f4cccb; }

/* ─── PAGINATION ─── */
.dash-leads-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 1.25rem; }
.dash-leads-page-lbl { font-size: 12.5px; color: #767676; font-weight: 600; }

/* ─── LEAD DETAIL MODAL ─── */
.dash-lm-overlay { position: fixed; inset: 0; background: rgba(7,40,50,.55); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dash-lm-box { background: #fff; border-radius: 12px; max-width: 580px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 28px 32px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dash-lm-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #767676; }
.dash-lm-close:hover { color: #111; }
.dash-lm-title { margin: 0 0 18px; font-size: 20px; font-weight: 800; color: #111; }
.dash-lm-row { display: flex; border-bottom: 1px solid #EFEFED; padding: 9px 0; font-size: 13px; gap: 12px; }
.dash-lm-row:last-child { border-bottom: none; }
.dash-lm-row-hdr { border-bottom: none; padding-top: 16px; }
.dash-lm-subhdr { font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; color: #888; }
.dash-lm-label { width: 160px; flex-shrink: 0; font-weight: 700; color: #555; }
.dash-lm-value { flex: 1; min-width: 0; word-break: break-word; color: #111; }
.dash-lm-value a { color: #0a5b66; }
.dash-lm-empty { color: #999; font-style: italic; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .dash-tabs { gap: 2px; }
  .dash-tab { font-size: 13px; padding: 10px 2px; }
  .dash-leads-toolbar { flex-direction: column; align-items: stretch; }
  .dash-leads-filters input[type="search"] { min-width: 0; }
}
