/* ───────────────────────────────────────────────────
   Clan Directory — Liquid Glass Chat UI
   Palette: deep navy · warm amber · aqua teal
   Fonts:   Fraunces (headings) · DM Sans (body)
─────────────────────────────────────────────────── */

/* ── Variables ── */
:root {
  --amber:        #E8A63A;
  --amber-dim:    rgba(232, 166, 58, 0.18);
  --amber-glow:   rgba(232, 166, 58, 0.35);
  --teal:         #0EA5A0;
  --teal-dim:     rgba(14, 165, 160, 0.18);
  --bg:           #070C14;
  --glass-bg:     rgba(13, 20, 32, 0.55);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-sheen:  rgba(255, 255, 255, 0.05);
  --blur:         blur(22px) saturate(160%);
  --text-1:       #E2E8F0;
  --text-2:       #94A3B8;
  --text-3:       #475569;
  --radius-card:  14px;
  --radius-pill:  999px;
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Background gradient mesh ── */
body,
.v-application,
.v-application .v-application__wrap {
  background:
    radial-gradient(ellipse 80% 60% at 12% 88%, rgba(232, 166, 58, 0.055) 0%, transparent 100%),
    radial-gradient(ellipse 65% 55% at 88% 12%, rgba(14, 165, 160, 0.055) 0%, transparent 100%),
    radial-gradient(ellipse 50% 45% at 55% 55%, rgba(79, 70, 229, 0.03) 0%, transparent 100%),
    #070C14 !important;
  min-height: 100dvh;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text-1);
}

/* ── App bar glass ── */
.glass-bar.v-app-bar,
.v-toolbar.glass-bar {
  background: rgba(7, 12, 20, 0.72) !important;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border) !important;
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.4) !important;
}

/* ── Brand typography ── */
.brand-word {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  color: var(--amber);
  letter-spacing: 0.12em;
}
.brand-word--sub {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.35em;
  margin-left: 10px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ── Member badge ── */
.member-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
  padding: 0 16px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  animation: pulse 2.4s ease-in-out infinite;
}

/* ── Layout ── */
.v-main {
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.v-main > .v-main__wrap {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.chat-wrapper {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

/* ── Messages scroll area ── */
.messages-area {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 0 12px;
  scroll-behavior: smooth;
}
.messages-area::-webkit-scrollbar { width: 4px; }
.messages-area::-webkit-scrollbar-track { background: transparent; }
.messages-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* ── Welcome screen ── */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  gap: 16px;
  animation: fadeUp 0.6s var(--ease-out) both;
}
.welcome-glyph {
  font-size: 36px;
  color: var(--amber);
  opacity: 0.6;
  line-height: 1;
}
.welcome-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-1);
  margin: 0;
}
.welcome-title em {
  font-style: italic;
  color: var(--amber);
}
.welcome-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 420px;
  line-height: 1.6;
  margin: 0;
}
.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.chip-suggest {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip-suggest:hover {
  border-color: rgba(232, 166, 58, 0.35);
  color: var(--amber);
  background: var(--amber-dim);
}

/* ── Message rows ── */
.msg-row {
  display: flex;
  margin-bottom: 20px;
  animation: msgIn 0.35s var(--ease-out) both;
}
.msg-user { justify-content: flex-end; }
.msg-assistant { justify-content: flex-start; }

/* ── Bubbles ── */
.msg-bubble--user {
  max-width: 72%;
  background: var(--amber-dim);
  border: 1px solid rgba(232, 166, 58, 0.22);
  border-radius: 18px 18px 5px 18px;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-1);
}
.msg-bubble--assistant {
  width: 100%;
  max-width: 100%;
}

/* ── Loading / thinking ── */
.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 18px 18px 18px 5px;
  margin-bottom: 6px;
}
.thinking-dots span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.18s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.36s; }
.thinking-label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  padding-left: 4px;
}

/* ── Error pill ── */
.error-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: #FCA5A5;
}

/* ── Parsed intent block ── */
.parsed-block {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.parsed-intent {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  font-style: italic;
}
.parsed-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.filter-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--teal-dim);
  border: 1px solid rgba(14, 165, 160, 0.25);
  color: var(--teal);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* ── Result count ── */
.result-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* ── Results grid ── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* ── Glass utility ── */
.glass-card {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--blur) !important;
  -webkit-backdrop-filter: var(--blur) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 var(--glass-sheen) !important;
}

/* ── Result card ── */
.result-card {
  position: relative;
  border-radius: var(--radius-card) !important;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: cardIn 0.45s var(--ease-out) both;
}
.result-card:hover {
  border-color: rgba(232, 166, 58, 0.3) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(232,166,58,0.15), inset 0 1px 0 var(--glass-sheen) !important;
  transform: translateY(-2px);
}
.result-card:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.card-score-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  transition: width 0.6s var(--ease-out);
}
.card-inner {
  padding: 16px;
}
.card-header-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.card-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber-dim), var(--teal-dim));
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 14px;
  color: var(--amber);
}
.card-meta { flex: 1; min-width: 0; }
.card-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.card-role {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}
.card-co { color: var(--text-3); }
.card-loc {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
}
.card-pct {
  flex-shrink: 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  color: var(--amber);
  line-height: 1;
}
.pct-sign { font-size: 12px; font-style: normal; }
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ── Tags ── */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
}
.tag--ind   { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); color: #A5B4FC; }
.tag--skill { background: var(--amber-dim);       border: 1px solid rgba(232,166,58,0.25); color: var(--amber); }
.tag--hobby { background: var(--teal-dim);         border: 1px solid rgba(14,165,160,0.25); color: var(--teal); }

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-2);
  font-size: 14px;
}

/* ── Input area ── */
.input-area {
  flex-shrink: 0;
  padding: 10px 0 22px;
}
.input-wrap {
  display: flex;
  align-items: center;
  border-radius: 16px !important;
  padding: 8px 8px 8px 20px;
  gap: 8px;
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-1);
  line-height: 1.5;
  padding: 6px 0;
  caret-color: var(--amber);
}
.chat-input::placeholder { color: var(--text-3); }
.chat-input:disabled { opacity: 0.5; }

.send-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--amber);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070C14;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.send-btn:hover:not(:disabled) { background: #F0B84A; transform: scale(1.05); }
.send-btn:active:not(:disabled) { transform: scale(0.97); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Profile modal ── */
.profile-modal {
  border-radius: 20px !important;
  overflow: hidden;
  padding: 28px 28px 24px;
  position: relative;
}
.profile-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.profile-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-1); }

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.profile-avatar-lg {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--amber-dim), var(--teal-dim));
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: var(--amber);
}
.profile-name {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--text-1);
  margin: 0 0 4px;
  line-height: 1.2;
}
.profile-role-line {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 4px;
}
.profile-loc-line {
  font-size: 12px;
  color: var(--text-3);
}

.profile-reasoning {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.section-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.reasoning-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.profile-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.pscore-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pscore-name {
  font-size: 12px;
  color: var(--text-3);
  width: 130px;
  flex-shrink: 0;
}
.pscore-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.pscore-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.8s var(--ease-out);
}
.pscore-fill--amber { background: linear-gradient(90deg, #C4892A, var(--amber)); }
.pscore-fill--teal  { background: linear-gradient(90deg, #0B8A85, var(--teal)); }
.pscore-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}

.profile-section { margin-bottom: 18px; }
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-linkedin {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}
.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #60A5FA;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  transition: background 0.2s, border-color 0.2s;
}
.linkedin-link:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.4);
}

/* ── Dialog overlay ── */
.v-overlay__scrim { background: rgba(4, 8, 14, 0.7) !important; backdrop-filter: blur(4px); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-7px); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--teal); }
  50%       { opacity: 0.5; box-shadow: 0 0 2px var(--teal); }
}

/* ── Responsive ── */
@media (max-width: 599px) {
  .chat-wrapper { padding: 0 12px; }
  .results-grid { grid-template-columns: 1fr; }
  .profile-modal { border-radius: 0 !important; padding: 20px; }
  .welcome-title { font-size: 26px; }
  .brand-word--sub { display: none; }
}

/* ── Accessibility: reduced transparency ── */
@media (prefers-reduced-transparency: reduce) {
  .glass-card,
  .glass-bar.v-app-bar,
  .input-wrap,
  .parsed-block,
  .thinking-dots,
  .chip-suggest {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #0D1420 !important;
  }
}

/* ── Vuetify dialog card override ── */
.v-dialog .v-card.glass-card { background: rgba(10,16,28,0.88) !important; }
