/* ---- chat ---- */
.chat { display: flex; flex-direction: column; gap: var(--s-3); }
.bubble { max-width: 78%; padding: 12px 16px; border-radius: var(--radius-lg); font-size: 15px; line-height: 1.45; }
.bubble .time { display: block; font-size: 11px; margin-top: 4px; opacity: .65; }
.bubble.ai { background: var(--white); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.bubble.user { background: var(--teal-grad); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 2px 8px rgba(14, 163, 138, .25); }
.bubble.system { background: var(--seafoam-light); align-self: stretch; max-width: none; }
.bubble .q + .q { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px dashed var(--border); }
.bubble.typing { padding: 14px 18px; }
.typing-dots { display: inline-flex; gap: 5px; align-items: center; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .35; animation: typing-blink 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-blink { 40% { opacity: 1; transform: translateY(-2px); } }

/* ---- one-time tag conversation (account / welcome) ---- */
.tag-talk .composer { position: static; margin-top: var(--s-3); box-shadow: none; }
.tag-talk .chat { max-height: 320px; overflow-y: auto; padding: 2px; }

/* ---- provider price verdict (offer review) ---- */
.price-verdict { border-radius: var(--radius-sm); padding: var(--s-3); font-size: 14px; line-height: 1.45; margin-top: var(--s-3); }
.price-verdict.good { background: var(--seafoam-light); color: var(--teal-dark); }
.price-verdict.too_cheap { background: #FFF8E6; color: #8A6D1A; }
.price-verdict.too_expensive { background: #FFF1F0; color: #B42324; }

.composer {
  display: flex; gap: var(--s-2); align-items: flex-end;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); margin-top: var(--s-4);
  position: sticky; bottom: var(--s-4);
  box-shadow: var(--shadow);
}
.composer textarea {
  flex: 1; border: 0; resize: none; outline: none; padding: 8px 0; max-height: 120px;
  background: transparent;
}
.composer .mic, .composer .send {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.composer .mic { background: var(--seafoam-light); color: var(--teal-dark); }
.composer .mic.recording { background: var(--coral); color: white; animation: pulse 1s infinite; }
.composer .send { background: var(--teal); color: white; }
@keyframes pulse { 50% { opacity: .6; } }

/* ---- extracted details / right panel ---- */
.details-card .detail-row { display: flex; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--soft-gray); }
.details-card .detail-row:last-child { border-bottom: 0; }
.details-card .detail-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--seafoam-light); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.details-card .detail-label { font-size: 12px; color: var(--muted); }
.details-card .detail-value { font-size: 14px; font-weight: 500; }

/* ---- price estimate ---- */
.price-card .amount { font-size: 28px; font-weight: 700; }

/* ---- match cards ---- */
.match-card { position: relative; }
.top-badge {
  position: absolute; top: -10px; left: var(--s-4);
  background: var(--ink); color: var(--white); font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 3px 12px;
}
.top-badge::before { content: '★ '; color: var(--seafoam); }
.price-compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.price-compare > div { background: var(--soft-gray); border-radius: var(--radius-sm); padding: var(--s-3); }
.price-compare .amount { font-size: 20px; font-weight: 700; }
.why-list { list-style: none; padding: 0; margin: 0; }
.why-list li { padding: 4px 0 4px 26px; position: relative; font-size: 14px; }
.why-list li::before { content: '✓'; position: absolute; left: 4px; color: var(--teal); font-weight: 700; }

/* ---- progress checklist ---- */
.progress-list { list-style: none; padding: 0; margin: 0; }
.progress-list li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; font-size: 15px; }
.progress-list .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.progress-list li.done .dot { background: var(--teal); border-color: var(--teal); color: white; }
.progress-list li.active .dot { border-color: var(--teal); }

/* ---- weekly availability editor ---- */
.week-editor .day-row { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--soft-gray); }
.week-editor .day-name { width: 90px; font-weight: 600; font-size: 14px; padding-top: 6px; text-transform: capitalize; }
.week-editor .blocks { flex: 1; display: flex; flex-direction: column; gap: var(--s-2); }
.week-editor .block { display: flex; align-items: center; gap: var(--s-2); }
.week-editor select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; background: white; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; margin-top: 5px; }
.toggle input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.toggle .track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .15s; }
.toggle .track::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: white; top: 2px; left: 2px; transition: left .15s; }
.toggle input:checked + .track { background: var(--teal); }
.toggle input:checked + .track::after { left: 20px; }

/* ---- schedule / date picker ---- */
.cal { width: 100%; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid .dow { font-size: 11px; color: var(--muted); padding: 4px 0; }
.cal-grid button {
  border: 0; background: transparent; border-radius: var(--radius-sm); padding: 8px 0; font-size: 14px;
}
.cal-grid button:hover:not(:disabled) { background: var(--seafoam-light); }
.cal-grid button.selected { background: var(--teal); color: white; font-weight: 600; }
.cal-grid button:disabled { color: var(--border); cursor: default; }

/* ---- tables (admin) ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: var(--s-2); border-bottom: 1px solid var(--border); }
.table td { padding: var(--s-2); border-bottom: 1px solid var(--soft-gray); vertical-align: top; }

/* ---- dashboard hero ---- */
.hero {
  display: flex; align-items: center; gap: var(--s-6);
  background: var(--hero-grad); border: 1px solid #DDF2ED;
  border-radius: var(--radius-lg); padding: var(--s-8);
  margin-bottom: var(--s-6); overflow: hidden;
}
.hero .hero-copy { flex: 1; min-width: 0; }
.hero img { width: 320px; max-width: 42%; flex-shrink: 0; }
@media (max-width: 820px) { .hero img { display: none; } .hero { padding: var(--s-6); } }

/* ---- misc ---- */
.dual-cta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 700px) { .dual-cta { grid-template-columns: 1fr; } }
.dual-cta .cta {
  text-align: left; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); padding: var(--s-6);
  box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.dual-cta .cta:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dual-cta .cta.primary { background: var(--teal-grad); color: white; border-color: transparent; }
.dual-cta .cta .icon {
  width: 44px; height: 44px; border-radius: 12px; font-size: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--seafoam-light); color: var(--teal-dark);
}
.dual-cta .cta.primary .icon { background: rgba(255, 255, 255, .18); color: white; }

.list-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--soft-gray); border-radius: var(--radius-sm); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
a.list-item:hover { background: var(--seafoam-light); text-decoration: none; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s-4); background: var(--hero-grad); }
.auth-card { width: 420px; max-width: 100%; background: white; border-radius: var(--radius-lg); padding: var(--s-8); box-shadow: var(--shadow-lg); }
.auth-split {
  display: grid; grid-template-columns: 1fr 1fr; width: 880px; max-width: 100%;
  background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.auth-split .auth-card { box-shadow: none; border-radius: 0; width: auto; }
.auth-split .auth-art { background: var(--seafoam-light); min-height: 100%; }
.auth-split .auth-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 820px) { .auth-split { grid-template-columns: 1fr; } .auth-split .auth-art { display: none; } }
/* app-icon tile treatment (brand sheet "App icon preview") */
.auth-logo {
  width: 60px; height: 60px; padding: 12px; border-radius: 16px;
  background: var(--white); border: 1px solid var(--border);
  margin-bottom: var(--s-3); box-shadow: var(--shadow);
}

.notif-unread { background: var(--seafoam-light); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,32,.45); display: flex; align-items: center; justify-content: center; z-index: 90; padding: var(--s-4); }
.modal { background: white; border-radius: var(--radius-lg); padding: var(--s-6); width: 480px; max-width: 100%; max-height: 90vh; overflow-y: auto; }
