/* ==========================================
   LandVest Pipeline — Tracker Styles
   Matches landing page: forest green + sand
   ========================================== */

/* ---- App Shell ---- */
.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

/* ---- App Navbar ---- */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--accent);
}

.app-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-nav-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.app-nav-tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
}

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.nav-link.active {
  background: rgba(212, 168, 67, 0.2);
  color: var(--accent);
}

.nav-link .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.nav-link.lead .dot { background: #7a9a80; }
.nav-link.contract .dot { background: var(--accent); }
.nav-link.assigned .dot { background: var(--accent-dark); }
.nav-link.closed .dot { background: var(--green-light); }

/* ---- Page Header ---- */
.page-header {
  padding: 24px 32px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.03em;
}

.page-sub {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-top: 2px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--green-mid); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--white);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--fg-light);
}

/* ---- Kanban Board ---- */
.kanban-wrap {
  padding: 24px 32px;
  overflow-x: auto;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 20px;
  min-width: 900px;
}

.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.kanban-col-header.lead   { background: rgba(122, 154, 128, 0.15); }
.kanban-col-header.contract { background: rgba(212, 168, 67, 0.15); }
.kanban-col-header.assigned  { background: rgba(184, 145, 46, 0.15); }
.kanban-col-header.closed    { background: rgba(61, 122, 82, 0.15); }

.col-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lead .col-dot     { background: #7a9a80; }
.contract .col-dot  { background: var(--accent); }
.assigned .col-dot { background: var(--accent-dark); }
.closed .col-dot    { background: var(--green-light); }

.col-count {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--fg-muted);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ---- Deal Cards ---- */
.deal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.deal-card:hover {
  border-color: var(--fg-light);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-1px);
}

.deal-address {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1.3;
}

.deal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deal-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.deal-meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deal-meta-value {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
}

.deal-meta-value.price { color: var(--green); }

.builder-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(26, 58, 42, 0.07);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
}

.fee-badge {
  margin-top: 10px;
  padding: 6px 10px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
}

.deal-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.btn-card {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.btn-card:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.empty-col {
  padding: 32px 16px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: 12px;
  color: var(--fg-light);
  font-size: 0.85rem;
}

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 21, 0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(15, 31, 21, 0.25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.03em;
}

.btn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 1.1rem;
  transition: all 0.15s;
}

.btn-close:hover {
  background: var(--bg-alt);
  color: var(--fg);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--bg);
  cursor: pointer;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a6650' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.08);
}

.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--bg);
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.08);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.form-actions .btn-primary { flex: 1; }
.form-actions .btn-secondary { flex: 1; }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active {
  background: var(--white);
  color: var(--green);
  box-shadow: 0 1px 4px var(--shadow);
}

/* ---- Contacts List ---- */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.contact-info { flex: 1; }

.contact-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
}

.contact-meta {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 2px;
}

.contact-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-type-badge.builder { background: rgba(26, 58, 42, 0.1); color: var(--green); }
.contact-type-badge.seller { background: rgba(212, 168, 67, 0.12); color: var(--accent-dark); }
.contact-type-badge.other { background: var(--bg-alt); color: var(--fg-muted); }

.contact-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 0.8rem;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--green);
  color: var(--white);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 8px 24px rgba(26, 58, 42, 0.3);
}

.toast.show { opacity: 1; }
.toast.error { background: #c0392b; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .app-nav { padding: 0 16px; }
  .page-header { padding: 16px 16px 12px; }
  .kanban-wrap { padding: 16px; }
  .modal { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .kanban { gap: 12px; }
}