/* Public chat refinements; shared installation styles remain in app.css. */
.chat-page { --primary: #514bd6; --accent: #159ab3; --ink: #172b46; --muted: #65758b; --line: #e5eaf2; background: radial-gradient(ellipse at 6% 0%, #eeecfc 0, transparent 48%), radial-gradient(ellipse at 100% 100%, #e6f5f5 0, transparent 48%), #f7f9fc; }
.chat-navbar { background: rgba(255,255,255,.82); border-bottom-color: rgba(229,234,242,.8); transition: height .2s, box-shadow .2s; }
.chat-navbar.compact { box-shadow: 0 4px 20px rgba(23,43,70,.04); }
.brand { min-width: 0; }
.brand strong { font-weight: 650; letter-spacing: -.025em; }
.brand small { margin-top: 2px; }
.brand-mark { box-shadow: 0 5px 14px rgba(81,75,214,.15); }
.nav-actions { gap: 4px; }
.nav-actions a { padding: 8px 11px; border-radius: 11px; font-weight: 600; font-size: .82rem; transition: background .2s, color .2s; }
.nav-actions a.active, .nav-actions a:hover { background: #efeffb; }
.chat-shell { padding: 102px 20px 22px; }
.chat-panel { height: calc(100dvh - 124px); min-height: 0; border: 1px solid rgba(220,227,239,.85); border-radius: 28px; background: rgba(255,255,255,.93); backdrop-filter: none; box-shadow: 0 24px 70px -30px rgba(37,52,83,.23), 0 2px 8px rgba(37,52,83,.025); }
.chat-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px clamp(18px,4vw,38px); border-bottom: 1px solid var(--line); background: rgba(249,250,253,.7); }
.chat-panel-heading h1 { font-size: .87rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.chat-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .73rem; }
.chat-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #24a38a; box-shadow: 0 0 0 3px #e8f6f2; }
.chat-status.is-unavailable::before { background: #8794a7; box-shadow: 0 0 0 3px #eef1f6; }
.messages { min-height: 0; padding: 28px clamp(16px,4vw,38px); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d5dce9 transparent; }
.message { gap: 11px; margin-bottom: 22px; }
.message:last-child { margin-bottom: 4px; }
.avatar { width: 32px; height: 32px; flex-basis: 32px; background: #eeedf9; color: var(--primary); font-weight: 700; font-size: .68rem; }
.avatar.has-image { background: transparent; }
.bubble { max-width: min(78%,680px); padding: 14px 18px; border-radius: 20px; background: #f4f6fa; border-color: #edf0f6; line-height: 1.65; font-size: .95rem; overflow-wrap: anywhere; box-shadow: none; }
.user .bubble { background: linear-gradient(135deg,#5751d9,#6761dd); border-bottom-right-radius: 6px; box-shadow: 0 4px 12px rgba(81,75,214,.1); }
.assistant .bubble { border-bottom-left-radius: 6px; }
.typing { padding: 5px 38px 12px; font-size: .78rem; }
.composer { flex-shrink: 0; margin: 0 clamp(12px,3vw,28px); gap: 10px; padding: 8px; border-color: #dce2ed; border-radius: 20px; box-shadow: 0 4px 16px rgba(23,43,70,.035); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #aaa6e9; box-shadow: 0 0 0 3px rgba(81,75,214,.07), 0 4px 16px rgba(23,43,70,.035); }
.composer textarea { min-width: 0; padding: 11px 10px; font-size: 1rem; line-height: 1.5; }
.composer textarea::placeholder { color: #7c899c; }
.composer button { flex: 0 0 46px; display: grid; place-items: center; width: 46px; height: 46px; background: var(--primary); transition: background .2s, transform .2s; }
.composer button:hover:not(:disabled) { background: #4540c0; transform: translateY(-1px); }
.composer button svg { width: 21px; height: 21px; }
.composer button:disabled { opacity: .45; cursor: default; }
.composer textarea:disabled { opacity: .65; }
.nav-actions a:focus-visible, .brand:focus-visible, .composer button:focus-visible, .restart-chat:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.privacy-row { position: static; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 13px 30px 17px; text-align: left; line-height: 1.5; }
.privacy-row a { color: #354d80; text-decoration: none; }
.privacy-row a:hover { text-decoration: underline; }
.restart-chat { position: static; flex-shrink: 0; color: var(--muted); padding: 3px 0; text-decoration: none; }
.restart-chat:hover { color: var(--primary); }
@media (max-width: 640px) {
    .chat-navbar, .chat-navbar.compact { height: 64px; }
    .chat-shell { padding: 76px 8px 0; }
    .chat-panel { height: calc(100dvh - 76px); border-radius: 22px 22px 0 0; border-bottom: 0; }
    .chat-panel-heading { padding: 13px 17px; }
    .messages { padding: 20px 13px; }
    .message { gap: 8px; margin-bottom: 18px; }
    .bubble { max-width: 86%; padding: 12px 14px; }
    .composer { margin: 0 10px; border-radius: 18px; }
    .privacy-row { justify-content: center; flex-wrap: wrap; padding: 11px 16px calc(12px + env(safe-area-inset-bottom)); text-align: center; }
    .restart-chat { margin: 0 5px; }
    .typing { padding-left: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    .chat-page *, .chat-page *::before, .chat-page *::after { scroll-behavior: auto !important; transition: none !important; }
    .typing span { animation: none; }
}
