/* ═══════════════════════════════════════════════════════════════════════════
   PropertyDesk — Vendor Directory   (pd-vp-*)
   Matches the system identity established by pd-mp-* (Maintenance Triage).
   ═══════════════════════════════════════════════════════════════════════════ */

.pd-vp-wrap { max-width: 100%; margin: 0 0 40px; font-family: inherit; }

/* ── Sub-header ───────────────────────────────────────────────────────────── */
.pd-vp-subhdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.pd-vp-subhdr__meta { font-size: 13px; color: #64748b; font-weight: 500; }
.pd-vp-subhdr__acts { display: flex; gap: 8px; align-items: center; }

.pd-vp-btn-primary, .pd-vp-btn-secondary, .pd-vp-btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 500;
  text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s;
  border: 1px solid transparent; cursor: pointer;
}
.pd-vp-btn-primary { background: #2e8b57; color: #fff !important; border-color: #2e8b57; }
.pd-vp-btn-primary:hover { background: #267a4c; border-color: #267a4c; color: #fff !important; }

.pd-vp-btn-secondary { background: #fff; color: #374151 !important; border-color: #d1d5db; padding: 7px 14px; font-size: 12px; }
.pd-vp-btn-secondary:hover { background: #f3f4f6; border-color: #9ca3af; }

.pd-vp-btn-danger { background: #fff; color: #b91c1c !important; border-color: #fecaca; padding: 7px 14px; font-size: 12px; }
.pd-vp-btn-danger:hover { background: #fee2e2; border-color: #fca5a5; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
.pd-vp-filters {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  padding: 12px 14px; background: #f8fafc;
  border: 1px solid #e5e7eb; border-radius: 8px 8px 0 0; border-bottom: none;
  margin-bottom: 0;
}
.pd-vp-fg { display: flex; flex-direction: column; gap: 3px; }
.pd-vp-fg label { font-size: 11px; color: #6b7280; font-weight: 500; }
.pd-vp-fsel, .pd-vp-finput {
  padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px;
  font-size: 13px; background: #fff; color: #374151; min-width: 140px;
}
.pd-vp-fsel:focus, .pd-vp-finput:focus {
  outline: none; border-color: #2e8b57; box-shadow: 0 0 0 2px rgba(46,139,87,.12);
}
.pd-vp-apply-btn {
  padding: 7px 16px; background: #2e8b57; color: #fff;
  border: 1px solid #2e8b57; border-radius: 5px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  align-self: flex-end;
}
.pd-vp-apply-btn:hover { background: #267a4c; }
.pd-vp-reset-btn {
  padding: 7px 14px; background: #fff; color: #374151 !important;
  border: 1px solid #d1d5db; border-radius: 5px;
  font-size: 13px; font-weight: 500; text-decoration: none !important;
  align-self: flex-end;
}
.pd-vp-reset-btn:hover { background: #f3f4f6; }

/* ── Main panel ───────────────────────────────────────────────────────────── */
.pd-vp-main {
  border: 1px solid #dee2e6; border-radius: 0 0 8px 8px;
  background: #fff; overflow: hidden;
}

/* ── Table ────────────────────────────────────────────────────────────────── */
.pd-vp-tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.pd-vp-tbl thead th {
  background: #2e8b57; color: #fff; padding: 10px 12px;
  text-align: left; font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}
.pd-vp-tbl tbody td {
  padding: 11px 12px; border-bottom: 1px solid #e5e7eb;
  vertical-align: middle; color: #374151; font-size: 14px;
}
.pd-vp-tbl tbody tr:nth-child(odd) td  { background: #ffffff !important; }
.pd-vp-tbl tbody tr:nth-child(even) td { background: #f0f9f3 !important; }
.pd-vp-tbl tbody tr:hover td { background: #e2f0e6 !important; }
.pd-vp-tbl tbody tr:last-child td { border-bottom: none; }

.pd-vp-link { color: #2e8b57; text-decoration: none; font-weight: 500; }
.pd-vp-link:hover { text-decoration: underline; }
.pd-vp-link-strong { font-weight: 700; }
.pd-vp-muted { color: #94a3b8; }

/* ── Status pill ──────────────────────────────────────────────────────────── */
.pd-vp-st {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
  text-transform: capitalize; white-space: nowrap;
}
.pd-vp-st__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pd-vp-st--active   { background: #dcfce7; color: #166534; }
.pd-vp-st--active   .pd-vp-st__dot { background: #22c55e; }
.pd-vp-st--inactive { background: #f3f4f6; color: #6b7280; }
.pd-vp-st--inactive .pd-vp-st__dot { background: #9ca3af; }

/* ── Action links inside table ────────────────────────────────────────────── */
.pd-vp-actions { display: flex; gap: 6px; }
.pd-vp-act {
  font-size: 11px; padding: 3px 9px; border-radius: 4px; font-weight: 500;
  text-decoration: none !important; transition: background .12s, border-color .12s;
  border: 1px solid;
}
.pd-vp-act--edit   { color: #166534 !important; border-color: #bbf7d0; background: #f0fdf4; }
.pd-vp-act--edit:hover   { background: #dcfce7; }
.pd-vp-act--delete { color: #991b1b !important; border-color: #fecaca; background: #fff; }
.pd-vp-act--delete:hover { background: #fee2e2; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.pd-vp-empty {
  padding: 48px 20px; text-align: center; color: #6b7280;
}
.pd-vp-empty__icon { font-size: 36px; opacity: .55; margin-bottom: 6px; }
.pd-vp-empty__msg  { font-size: 15px; margin-bottom: 14px; }
.pd-vp-empty__cta  {
  display: inline-block; padding: 8px 18px; background: #2e8b57; color: #fff !important;
  border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.pd-vp-empty__cta:hover { background: #267a4c; }

/* ════════════ Detail page ════════════════════════════════════════════════ */

.pd-vp-hero {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 18px 22px; margin-bottom: 16px;
  border-top: 3px solid #2e8b57;
}
.pd-vp-hero__name {
  font-size: 22px; font-weight: 700; color: #0f6e56;
  margin-bottom: 8px; letter-spacing: -0.01em;
}
.pd-vp-hero__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pd-vp-hero__spec {
  font-size: 12px; padding: 3px 10px;
  background: #e2e8f0; color: #475569;
  border-radius: 4px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}

.pd-vp-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 16px;
}
@media (max-width: 768px) { .pd-vp-body { grid-template-columns: 1fr; } }

.pd-vp-panel {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;
}
.pd-vp-panel__hdr {
  padding: 10px 14px; background: #f8fafc;
  font-size: 12px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid #e5e7eb;
}
.pd-vp-rows { padding: 8px 4px; }
.pd-vp-row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 12px; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.pd-vp-row:last-child { border-bottom: none; }
.pd-vp-row__lbl { color: #6b7280; font-weight: 500; font-size: 12px; }
.pd-vp-row__val { color: #111827; font-variant-numeric: tabular-nums; }
.pd-vp-row__val strong { font-weight: 700; color: #0f6e56; }

.pd-vp-notes {
  padding: 14px 18px; font-size: 13.5px; color: #374151; line-height: 1.6;
}

/* ════════════ Add / Edit form ═══════════════════════════════════════════ */

.pd-vp-form {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  max-width: 820px; margin: 0 auto;
  border-top: 3px solid #2e8b57; overflow: hidden;
}
.pd-vp-form .pd-form-section {
  border: none !important; margin: 0 !important; padding: 0 !important;
  background: none !important; box-shadow: none !important;
}
.pd-vp-form .pd-form-section > legend {
  display: block; width: 100%; padding: 16px 24px 0; margin: 0;
  border: none; background: none; float: none;
}
.pd-vp-form .pd-form-section > legend .fieldset-legend,
.pd-vp-form fieldset > legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: #0f6e56;
  text-transform: uppercase; letter-spacing: .06em; padding: 0;
}
.pd-vp-form fieldset > legend::before {
  content: ''; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: #2e8b57; flex-shrink: 0;
}
.pd-vp-form .pd-form-section > .fieldset-wrapper {
  padding: 12px 24px 22px;
}
.pd-vp-form .pd-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px;
}
.pd-vp-form .pd-form-grid .pd-full-width { grid-column: 1 / -1; }
.pd-vp-form label {
  font-size: 13px; font-weight: 500; color: #4b5563;
  margin-bottom: 5px; display: block;
}
.pd-vp-form .form-required::after { content: ' *'; color: #dc2626; }

.pd-vp-form input[type="text"],
.pd-vp-form input[type="email"],
.pd-vp-form input[type="tel"],
.pd-vp-form input[type="number"],
.pd-vp-form select,
.pd-vp-form textarea {
  border: 1px solid #d1d5db; border-radius: 6px;
  padding: 9px 12px; font-size: 14px; color: #111827; background: #fff;
  width: 100%; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.pd-vp-form input:focus,
.pd-vp-form select:focus,
.pd-vp-form textarea:focus {
  outline: none; border-color: #2e8b57;
  box-shadow: 0 0 0 3px rgba(46,139,87,.12);
}
.pd-vp-form textarea { min-height: 90px; resize: vertical; font-family: inherit; }

.pd-vp-form .form-actions {
  padding: 16px 24px; border-top: 1px solid #ebedf0; background: #f8f9fb;
  display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin: 0;
}
.pd-vp-save-btn,
.pd-vp-form .form-actions .button--primary,
.pd-vp-form .form-actions input[type="submit"] {
  background: #2e8b57 !important; color: #fff !important; border: none !important;
  padding: 10px 24px !important; border-radius: 6px !important;
  font-size: 13px !important; font-weight: 600 !important; cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(46,139,87,.18) !important;
}
.pd-vp-save-btn:hover,
.pd-vp-form .form-actions .button--primary:hover,
.pd-vp-form .form-actions input[type="submit"]:hover {
  background: #267a4c !important; transform: translateY(-1px);
}
.pd-vp-cancel-link {
  font-size: 13px; color: #6b7280 !important; text-decoration: none !important;
}
.pd-vp-cancel-link:hover { color: #374151 !important; text-decoration: underline !important; }

/* ════════════ Autocomplete suggestions on ticket form ═══════════════════ */
.pd-vp-ac-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1000;
  background: #fff; border: 1px solid #d1d5db; border-top: none;
  border-radius: 0 0 6px 6px; max-height: 220px; overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
  display: none;
}
.pd-vp-ac-results.visible { display: block; }
.pd-vp-ac-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; font-size: 13px; color: #374151;
  cursor: pointer; border-bottom: 1px solid #f3f4f6;
}
.pd-vp-ac-item:hover { background: #f0fdf4; color: #166534; }
.pd-vp-ac-item:last-child { border-bottom: none; }
.pd-vp-ac-item__spec {
  font-size: 10.5px; color: #94a3b8; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  margin-left: auto;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pd-vp-subhdr { flex-direction: column; align-items: flex-start; }
  .pd-vp-filters { flex-direction: column; align-items: stretch; }
  .pd-vp-fsel, .pd-vp-finput { min-width: unset; width: 100%; }
  .pd-vp-tbl thead th:nth-child(4), .pd-vp-tbl tbody td:nth-child(4),
  .pd-vp-tbl thead th:nth-child(5), .pd-vp-tbl tbody td:nth-child(5) { display: none; }
}
