/*
 * RGI CRM — application.css
 * Custom styles layered on top of Tailwind CSS
 * Aligned to BRAND_GUIDELINES.md — RGI navy #1B365D + gold #F7C526
 */

/* =============================
   SMOOTH TRANSITIONS
   ============================= */
body {
  transition: opacity 0.1s ease;
}

/* Honor prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  main > * { animation: none !important; }
}

/* =============================
   FONTS — Poppins preloaded in CSS, also loaded in layout head
   ============================= */

/* =============================
   VOICE MEMO RECORDING UI
   ============================= */
.record-btn {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.record-btn-inner {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
  transition: all 0.2s ease;
}
.recording-pulse {
  animation: pulse-ring 1.5s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5), 0 4px 14px 0 rgba(239, 68, 68, 0.4); }
  50%  { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0), 0 4px 14px 0 rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 4px 14px 0 rgba(239, 68, 68, 0.4); }
}
.recording-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #ef4444;
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.wave-bar {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: #ef4444;
  transition: height 0.12s ease;
}

/* =============================
   PAGE ENTRANCE ANIMATION
   ============================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
main > * {
  animation: fadeInUp 0.2s ease-out both;
}
main > *:nth-child(2) { animation-delay: 0.04s; }
main > *:nth-child(3) { animation-delay: 0.08s; }
main > *:nth-child(4) { animation-delay: 0.12s; }

/* =============================
   DEMO CREDENTIAL BUTTONS (login page)
   ============================= */
.demo-credential-btn {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}
.demo-credential-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(247, 197, 38, 0.4);
  transform: translateY(-1px);
}

/* =============================
   SCROLLBARS
   ============================= */
aside::-webkit-scrollbar          { width: 4px; }
aside::-webkit-scrollbar-track    { background: transparent; }
aside::-webkit-scrollbar-thumb    { background: rgba(27,54,93,0.2); border-radius: 2px; }
::-webkit-scrollbar               { width: 6px; height: 6px; }
::-webkit-scrollbar-track         { background: #F8F9FA; }
::-webkit-scrollbar-thumb         { background: #DBDBDB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover   { background: #8E98A8; }

/* =============================
   FORM FOCUS RINGS — RGI navy brand
   ============================= */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.15);
  border-color: #1B365D;
}

/* =============================
   BADGE / PILL BASE
   Brand-aligned, WCAG 2.2 AA contrast verified
   ============================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

/* Priority badges */
.badge-hot  { background: #FEF2F2; color: #B91C1C; }
.badge-warm { background: #FEF9E9; color: #AF8C1B; }
.badge-cold { background: #E8EBEF; color: #132642; }

/* Lead status badges */
.badge-new           { background: #E8EBEF; color: #132642; }
.badge-qualified     { background: #ECFDF5; color: #047857; }
.badge-proposal_sent { background: #FEF9E9; color: #AF8C1B; }
.badge-closed_won    { background: #ECFDF5; color: #047857; }
.badge-closed_lost   { background: #FEF2F2; color: #B91C1C; }

/* Property / deal status badges */
.badge-active            { background: #ECFDF5; color: #047857; }
.badge-draft             { background: #F1F3F5; color: #30343B; }
.badge-under_contract    { background: #FDEDBC; color: #886C15; }
.badge-closed            { background: #B8C1CD; color: #132642; }
.badge-off_market        { background: #F1F3F5; color: #5B6474; }
.badge-cancelled         { background: #FEF2F2; color: #B91C1C; }
.badge-offer_pending     { background: #FEF9E9; color: #AF8C1B; }
.badge-pending           { background: #FEF9E9; color: #AF8C1B; }
.badge-in_progress       { background: #E8EBEF; color: #132642; }
.badge-completed         { background: #ECFDF5; color: #047857; }

/* Showing badges */
.badge-scheduled          { background: #E8EBEF; color: #132642; }
.badge-completed_showing  { background: #ECFDF5; color: #047857; }
.badge-cancelled_showing  { background: #FEF2F2; color: #B91C1C; }
.badge-no_show            { background: #FEF2F2; color: #B91C1C; }

/* Contact type badges */
.badge-buyer    { background: #E8EBEF; color: #132642; }
.badge-seller   { background: #FDEDBC; color: #886C15; }
.badge-investor { background: #B8C1CD; color: #132642; }

/* Property type badges (multi-type JSON) */
.badge-residential   { background: #E8EBEF; color: #132642; }
.badge-commercial    { background: #B8C1CD; color: #132642; }
.badge-multi_family  { background: #FEF9E9; color: #AF8C1B; }
.badge-industrial    { background: #FEF2F2; color: #B91C1C; }
.badge-land          { background: #ECFDF5; color: #047857; }
.badge-office        { background: #E8EBEF; color: #132642; }
.badge-retail        { background: #FDEDBC; color: #886C15; }
.badge-flex          { background: #F1F3F5; color: #5B6474; }
.badge-mixed_use     { background: #B8C1CD; color: #132642; }
.badge-special_purpose { background: #FEF9E9; color: #AF8C1B; }

/* Document type badges */
.badge-listing_agreement    { background: #E8EBEF; color: #132642; }
.badge-offer                { background: #FDEDBC; color: #886C15; }
.badge-lease                { background: #FEF9E9; color: #AF8C1B; }
.badge-inspection           { background: #FEF2F2; color: #B91C1C; }
.badge-disclosure           { background: #ECFDF5; color: #047857; }
.badge-loi                  { background: #F1F3F5; color: #5B6474; }
.badge-buyer_rep_agreement  { background: #E8EBEF; color: #132642; }
.badge-tenant_rep_agreement { background: #FEF9E9; color: #AF8C1B; }
.badge-appraisal            { background: #ECFDF5; color: #047857; }
.badge-other                { background: #F1F3F5; color: #5B6474; }

/* Task priority badges */
.badge-urgent { background: #FEF2F2; color: #B91C1C; }
.badge-high   { background: #FEF9E9; color: #AF8C1B; }
.badge-normal { background: #F1F3F5; color: #5B6474; }
.badge-low    { background: #ECFDF5; color: #047857; }

/* Voice memo status badges */
.badge-transcribing { background: #FEF9E9; color: #AF8C1B; animation: pulse-slow 2s ease-in-out infinite; }
.badge-processing   { background: #FEF9E9; color: #AF8C1B; animation: pulse-slow 2s ease-in-out infinite; }
.badge-transcribed  { background: #ECFDF5; color: #047857; }
.badge-converted    { background: #FDEDBC; color: #886C15; }
.badge-failed       { background: #FEF2F2; color: #B91C1C; }

/* Tag color badges */
.badge-amber  { background: #FDEDBC; color: #886C15; }
.badge-green  { background: #ECFDF5; color: #047857; }
.badge-purple { background: #F3E8FF; color: #6D28D9; }
.badge-blue   { background: #EFF6FF; color: #1D4ED8; }
.badge-red    { background: #FEF2F2; color: #B91C1C; }
.badge-slate  { background: #F1F3F5; color: #5B6474; }

/* Interest level badges */
.badge-interested      { background: #E8EBEF; color: #132642; }
.badge-very_interested { background: #FDEDBC; color: #886C15; }
.badge-toured          { background: #ECFDF5; color: #047857; }
.badge-offer_made      { background: #FEF9E9; color: #AF8C1B; }

/* Lead source badges */
.badge-voice_memo    { background: #FDEDBC; color: #886C15; }
.badge-website       { background: #E8EBEF; color: #132642; }
.badge-referral      { background: #ECFDF5; color: #047857; }
.badge-cold_outreach { background: #FEF2F2; color: #B91C1C; }
.badge-direct        { background: #F1F3F5; color: #5B6474; }

/* Deal stage badges */
.badge-prospect    { background: #E8EBEF; color: #132642; }
.badge-analysis    { background: #FEF9E9; color: #AF8C1B; }
.badge-negotiation { background: #FDEDBC; color: #886C15; }
.badge-due_diligence { background: #FEF9E9; color: #AF8C1B; }
.badge-closing     { background: #ECFDF5; color: #047857; }
.badge-won         { background: #ECFDF5; color: #047857; }
.badge-lost        { background: #FEF2F2; color: #B91C1C; }

/* =============================
   PAGE HEADER
   ============================= */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-title {
  font-family: 'Poppins', 'Inter', ui-sans-serif, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0A0B0E;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.page-subtitle {
  font-size: 0.875rem;
  color: #5B6474;
  margin-top: 0.125rem;
}

/* =============================
   CARD
   Spec: bg-white rounded-2xl border border-ink-200 shadow-sm
   ============================= */
.card {
  background: #ffffff;
  border: 1px solid #E9EBF0;
  border-radius: 1.25rem; /* rounded-2xl = 20px */
  padding: 1.5rem;
  box-shadow: 0 2px 6px -1px rgba(27,54,93,0.06), 0 1px 3px -1px rgba(27,54,93,0.08);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover.card-hoverable,
.card-hoverable:hover {
  box-shadow: 0 4px 12px -2px rgba(27,54,93,0.10), 0 2px 6px -2px rgba(27,54,93,0.08);
  border-color: #DBDBDB;
}
.card-sm {
  background: #ffffff;
  border: 1px solid #E9EBF0;
  border-radius: 1rem; /* rounded-xl = 16px */
  padding: 1rem;
  box-shadow: 0 2px 6px -1px rgba(27,54,93,0.06), 0 1px 3px -1px rgba(27,54,93,0.08);
  transition: box-shadow 0.15s ease;
}

/* =============================
   STAT CARD
   ============================= */
.stat-card {
  background: #ffffff;
  border: 1px solid #E9EBF0;
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 6px -1px rgba(27,54,93,0.06), 0 1px 3px -1px rgba(27,54,93,0.08);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.stat-card:hover {
  box-shadow: 0 4px 12px -2px rgba(27,54,93,0.10), 0 2px 6px -2px rgba(27,54,93,0.08);
  transform: translateY(-1px);
}

/* =============================
   DATA TABLE — brand-aligned header
   ============================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5B6474;
  padding: 0.75rem 1.25rem;
  background: #F8F9FA;
  border-bottom: 1px solid #E9EBF0;
  white-space: nowrap;
}
.data-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #F1F3F5;
  font-size: 0.875rem;
  color: #1F2128;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr {
  transition: background 0.1s ease;
  cursor: default;
}
.data-table tbody tr:hover td {
  background: #E8EBEF;
}
.data-table tbody tr:hover {
  cursor: pointer;
}

/* =============================
   BUTTONS — RGI brand palette
   Spec §5.1: primary=navy, accent=gold
   Minimum height h-11 (44px) for touch targets
   ============================= */

/* Primary (filled navy) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 1.25rem;
  height: 2.75rem; /* 44px — min touch target */
  background: #1B365D;
  color: #ffffff;
  font-family: 'Poppins', 'Inter', ui-sans-serif, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem; /* rounded-lg */
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #F7C526;
  color: #0B1727;
  box-shadow: 0 8px 32px -8px rgba(247,197,38,0.35);
}
.btn-primary:active  { background: #132642; color: #ffffff; }
.btn-primary:focus-visible {
  outline: 2px solid #F7C526;
  outline-offset: 2px;
}
.btn-primary:disabled {
  background: #E9EBF0;
  color: #8E98A8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Accent (filled gold) — for Record Memo, primary CTAs */
.btn-amber, .btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 1.25rem;
  height: 2.75rem;
  background: #F7C526;
  color: #0B1727;
  font-family: 'Poppins', 'Inter', ui-sans-serif, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-amber:hover, .btn-accent:hover {
  background: #E1B323;
  box-shadow: 0 4px 12px -2px rgba(247,197,38,0.4);
}
.btn-amber:active, .btn-accent:active { background: #AF8C1B; }

/* Outline */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 1.25rem;
  height: 2.75rem;
  background: transparent;
  color: #1B365D;
  font-family: 'Poppins', 'Inter', ui-sans-serif, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 1.5px solid #1B365D;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-outline:hover { background: #E8EBEF; }

/* Secondary (light neutral) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 1rem;
  height: 2.75rem;
  background: #ffffff;
  color: #30343B;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  border: 1px solid #E9EBF0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-secondary:hover { background: #F1F3F5; border-color: #DBDBDB; }

/* Danger */
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 1.25rem;
  height: 2.75rem;
  background: #EF4444;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.btn-danger:hover { background: #B91C1C; }

/* =============================
   FORM ELEMENTS — §5.4
   ============================= */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #30343B;
}
.form-input {
  width: 100%;
  padding: 0 0.875rem;
  height: 2.75rem; /* 44px touch target */
  border: 1px solid #DBDBDB;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1F2128;
  background: #ffffff;
  placeholder-color: #8E98A8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input::placeholder { color: #8E98A8; }
.form-input:focus {
  outline: none;
  border-color: #1B365D;
  box-shadow: 0 0 0 3px rgba(27,54,93,0.12);
}

/* Google Places PlaceAutocompleteElement — match form-input styling.
   It's a custom element with shadow DOM so we style the host and let
   the internal input inherit where possible. */
gmp-place-autocomplete.address-autocomplete-input,
.address-autocomplete-input {
  display: block;
  width: 100%;
  height: 2.75rem;          /* matches form-input 44px touch target */
  border: 1px solid #DBDBDB;
  border-radius: 0.5rem;
  background: #ffffff;
  font-size: 0.875rem;
  color: #1F2128;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  padding: 0;
  --gmp-primary-color: #1B365D;
  --gmp-focus-ring-color: rgba(27,54,93,0.12);
}
.address-autocomplete-input:focus-within {
  outline: none;
  border-color: #1B365D;
  box-shadow: 0 0 0 3px rgba(27,54,93,0.12);
}
/* Style the internal input that Google exposes via ::part or via direct
   descendant (the library's structure has changed across versions) */
.address-autocomplete-input::part(input),
.address-autocomplete-input input {
  width: 100% !important;
  height: 100% !important;
  padding: 0 0.875rem !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 0.875rem !important;
  font-family: inherit !important;
  color: #1F2128 !important;
  outline: none !important;
  border-radius: 0.5rem !important;
}
.address-autocomplete-input::part(input)::placeholder,
.address-autocomplete-input input::placeholder {
  color: #8E98A8 !important;
}
/* Suggestion dropdown: Google wraps predictions in gmp-place-autocomplete-suggestion */
gmp-place-autocomplete-suggestion {
  font-family: var(--font-sans) !important;
}

.form-select {
  width: 100%;
  padding: 0 2.5rem 0 0.875rem;
  height: 2.75rem;
  border: 1px solid #DBDBDB;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1F2128;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238E98A8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1.125rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease;
}
.form-select:focus {
  outline: none;
  border-color: #1B365D;
  box-shadow: 0 0 0 3px rgba(27,54,93,0.12);
}

.form-textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #DBDBDB;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1F2128;
  background: #ffffff;
  resize: vertical;
  min-height: 6rem;
  transition: border-color 0.15s ease;
}
.form-textarea:focus {
  outline: none;
  border-color: #1B365D;
  box-shadow: 0 0 0 3px rgba(27,54,93,0.12);
}

/* =============================
   DETAIL ROW (show pages)
   ============================= */
.detail-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #F1F3F5;
  font-size: 0.875rem;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  font-weight: 500;
  color: #5B6474;
  min-width: 9rem;
  flex-shrink: 0;
}
.detail-value {
  color: #1F2128;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

/* =============================
   PROGRESS BAR — navy/gold
   ============================= */
.progress-bar {
  height: 0.5rem;
  background: #E9EBF0;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1B365D, #495E7D);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* =============================
   EMPTY STATE — §5.7
   Gold circle bg, centered column
   ============================= */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}
.empty-state-icon-wrap {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  background: #FEF9E9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.empty-state-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #AF8C1B;
}
/* Legacy: plain icon without wrapper */
.empty-state > .empty-state-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: #AF8C1B;
}
.empty-state-title {
  font-family: 'Poppins', 'Inter', ui-sans-serif, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1F2128;
  margin-bottom: 0.375rem;
}
.empty-state-text {
  font-size: 0.875rem;
  color: #5B6474;
  max-width: 28rem;
  margin: 0 auto 1.25rem;
}

/* =============================
   ACTION LINK
   ============================= */
.action-link {
  font-size: 0.875rem;
  color: #1B365D;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
  text-underline-offset: 2px;
}
.action-link:hover {
  color: #F7C526;
  text-decoration: underline;
}

/* =============================
   OVERDUE BADGE
   ============================= */
.overdue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
}

/* =============================
   SECTION HEADER
   ============================= */
.section-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #8E98A8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* =============================
   FILTER BAR
   ============================= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid #E9EBF0;
  border-radius: 1.25rem;
  margin-bottom: 1.25rem;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 12rem;
}
.search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #8E98A8;
  pointer-events: none;
}
.search-wrap input {
  padding-left: 2.5rem;
}

/* =============================
   CHECKLIST ITEM
   ============================= */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid #F1F3F5;
}
.checklist-item:last-child { border-bottom: none; }

/* =============================
   AVATAR INITIALS — RGI navy
   ============================= */
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: #1B365D;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  flex-shrink: 0;
  letter-spacing: 0.025em;
}
.avatar-sm  { width: 1.5rem; height: 1.5rem; font-size: 0.625rem; }
.avatar-lg  { width: 3rem;   height: 3rem;   font-size: 1rem; }

/* =============================
   PIPELINE STAGE
   ============================= */
.pipeline-stage {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* =============================
   QUICK ACTION CARD
   ============================= */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #E9EBF0;
  border-radius: 1.25rem;
  text-decoration: none;
  color: #1F2128;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.quick-action:hover {
  border-color: #F7C526;
  box-shadow: 0 4px 12px rgba(247,197,38,0.2);
  transform: translateY(-2px);
}
.quick-action:active {
  transform: translateY(0);
  box-shadow: none;
}
.quick-action-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.quick-action:hover .quick-action-icon { transform: scale(1.08); }
.quick-action-label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}

/* =============================
   FLASH ANIMATIONS
   ============================= */
@keyframes slideInDown {
  from { transform: translateY(-0.5rem); opacity: 0; }
  to   { transform: translateY(0);       opacity: 1; }
}
#flash-notice, #flash-alert {
  animation: slideInDown 0.2s ease-out both;
}
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* =============================
   GOOGLE PLACES AUTOCOMPLETE — brand colors
   ============================= */
gmp-placeautocomplete {
  display: block;
  width: 100%;
  border: 1px solid #DBDBDB;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  --gmpx-color-surface: #ffffff;
  --gmpx-color-on-surface: #1F2128;
  --gmpx-color-on-surface-variant: #5B6474;
  --gmpx-color-primary: #1B365D;
  --gmpx-color-on-primary: #ffffff;
  --gmpx-color-outline: #DBDBDB;
  --gmpx-font-family-base: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --gmpx-font-size-base: 0.875rem;
}
gmp-placeautocomplete:focus-within {
  border-color: #1B365D;
  box-shadow: 0 0 0 3px rgba(27,54,93,0.12);
}
gmp-placeautocomplete::part(panel) {
  background: #ffffff;
  border: 1px solid #E9EBF0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(27,54,93,0.1);
}

/* =============================
   SEARCHABLE SELECT DROPDOWN
   ============================= */
.searchable-select-wrapper { position: relative; }
.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 15rem;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #DBDBDB;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(27,54,93,0.1);
  margin-top: 0.25rem;
  list-style: none;
  padding: 0.25rem 0;
}
.searchable-select-option {
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #1F2128;
  cursor: pointer;
  transition: background 0.1s ease;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
.searchable-select-option:hover,
.searchable-select-option.highlighted {
  background: #E8EBEF;
  color: #1B365D;
}
.searchable-select-no-results {
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #8E98A8;
  font-style: italic;
}

/* =============================
   FOCUS RING — gold brand per §8
   ============================= */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #F7C526;
  outline-offset: 2px;
  border-radius: 0.25rem;
}
