.lk-chat [hidden], .chat-admin [hidden] { display: none !important; }
.lk-chat { --chat-border: #d9dee3; font-family: 'DM Sans', sans-serif; color: var(--black, #0b0d10); }
.lk-chat button, .lk-chat textarea, .chat-admin button, .chat-admin textarea { font: inherit; }
.lk-chat button, .chat-admin button { cursor: pointer; }
.lk-chat button:disabled, .chat-admin button:disabled { cursor: wait; opacity: .6; }
.lk-chat :focus-visible, .chat-admin :focus-visible { outline: 3px solid #8cbaff; outline-offset: 3px; }
.chat-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 12px; border: 1px solid #375b88; border-radius: 6px; padding: 15px 20px; background: var(--navy, #06275d); color: #fff; box-shadow: 0 6px 22px #06275d26; font-weight: 700 !important; }
.chat-launcher svg { width: 24px; height: 24px; }
.chat-launcher:hover { background: var(--blue, #084baa); }
.chat-panel { position: fixed; right: 24px; bottom: 92px; z-index: 61; width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 120px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--chat-border); border-radius: 8px; background: #fff; box-shadow: 0 18px 60px #06275d30; }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--navy, #06275d); color: #fff; padding: 20px; border-bottom: 4px solid var(--blue, #084baa); }
.chat-header h2 { font: 700 27px/.95 'Barlow Condensed', sans-serif; margin: 0 0 7px; }
.chat-header p { margin: 0; font-size: 12px; color: #dce4ef; }
.chat-close { padding: 8px; border: 1px solid #6d85a5; color: #fff; background: transparent; border-radius: 4px; line-height: 1; }
.chat-close svg { display: block; width: 18px; height: 18px; }
.chat-welcome { padding: 24px; overflow-y: auto; }
.chat-welcome h3 { font-size: 31px; line-height: 1; margin-bottom: 14px; }
.chat-welcome p { font-size: 14px; line-height: 1.6; color: #53606b; }
.chat-welcome label { display: flex; gap: 10px; font-size: 12px; line-height: 1.6; margin: 20px 0; }
.chat-welcome input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 3px; accent-color: var(--blue, #084baa); }
.chat-welcome .button { width: 100%; border: 0; }
.chat-thread { flex: 1; overflow-y: auto; padding: 20px 16px; background: var(--mist, #edf0f3); overscroll-behavior: contain; }
.chat-message { max-width: 90%; margin-bottom: 15px; }
.chat-message p { margin: 0; padding: 12px 14px; border: 1px solid #d9dee3; background: #fff; border-radius: 5px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message small { display: block; font-size: 10px; color: #56616c; margin: 0 2px 5px; font-weight: 600; }
.chat-message.customer { margin-left: auto; }
.chat-message.customer p { background: var(--navy, #06275d); color: #fff; border-color: var(--navy, #06275d); }
.chat-message.owner p { border-left: 4px solid var(--blue, #084baa); }
.chat-composer { padding: 12px 16px; display: flex; gap: 10px; align-items: end; border-top: 1px solid var(--chat-border); }
.chat-composer label { flex: 1; font-size: 11px; font-weight: 700; }
.chat-composer textarea { display: block; width: 100%; resize: none; margin-top: 5px; padding: 10px; border: 1px solid var(--chat-border); border-radius: 3px; background: #fff; color: var(--black, #0b0d10); font-size: 14px; }
.chat-composer .button { padding: 13px 15px; border: 0; }
.chat-status { padding: 0 16px; margin: 0 0 10px; font-size: 11px; color: #53606b; line-height: 1.5; }
.chat-tools { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--chat-border); padding: 10px 16px; font-size: 11px; }
.chat-tools a { color: var(--navy, #06275d); font-weight: 700; }
.chat-owner-access { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 10px 16px; border-top: 1px solid var(--chat-border); background: var(--mist, #edf0f3); font-size: 11px; }
.chat-owner-access a { color: var(--navy, #06275d); font-weight: 700; }
.chat-owner-access span { color: #53606b; }
.chat-owner-footer-link { display: inline-block; margin-left: 16px; }
.chat-text-button { border: 0; padding: 4px 0; background: transparent; color: #53606b; text-decoration: underline; font-size: 11px !important; }
.chat-admin { background: var(--mist); min-height: 100vh; }
.chat-admin .page-head { padding: 44px 0; }
.chat-admin .page-head h1 { font-size: 64px; }
.chat-admin-main { padding: 32px 0 60px; }
.chat-account { max-width: 470px; background: #fff; padding: 28px; border-top: 5px solid var(--blue); }
.chat-account h2 { font-size: 32px; }
.chat-account label { display: block; font-size: 13px; font-weight: 700; margin: 16px 0; }
.chat-account input, .chat-filter { width: 100%; padding: 12px; margin-top: 7px; border: 1px solid var(--line); font: inherit; background: #fff; }
.chat-account .button { border: 0; }
.chat-account p, .chat-owner-note { font-size: 13px; line-height: 1.6; color: #53606b; }
.chat-owner-setup { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: #53606b; }
.chat-owner-setup summary { color: var(--navy); font-weight: 700; cursor: pointer; }
.chat-owner-setup ol { padding-left: 20px; }
.chat-owner-setup li { margin: 10px 0; }
.chat-owner-setup a { color: var(--navy); font-weight: 700; }
.chat-inbox-guide { padding: 20px 24px; margin-bottom: 24px; background: #fff; border-left: 5px solid var(--blue); font-size: 14px; line-height: 1.6; }
.chat-inbox-guide > strong { color: var(--navy); }
.chat-inbox-guide p { margin: 10px 0 0; color: #53606b; }
.chat-dashboard-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.chat-dashboard-header p { margin: 0; color: #53606b; font-size: 13px; }
.chat-dashboard-header button { border: 1px solid var(--line); }
.chat-workspace { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 580px; border: 1px solid var(--line); background: #fff; }
.chat-sidebar { border-right: 1px solid var(--line); padding: 18px; }
.chat-sidebar h2 { font-size: 31px; margin-bottom: 8px; }
.chat-sidebar label { font-size: 12px; color: #53606b; }
.chat-conversation-list { max-height: 650px; overflow-y: auto; margin-top: 18px; }
.chat-conversation-button { width: 100%; display: block; text-align: left; border: 1px solid var(--line); background: #fff; padding: 14px; margin-bottom: 10px; border-left: 4px solid transparent; }
.chat-conversation-button[aria-pressed="true"] { border-left-color: var(--blue); background: var(--mist); }
.chat-conversation-button strong, .chat-conversation-button span { display: block; overflow-wrap: anywhere; }
.chat-conversation-button span { font-size: 11px; color: #53606b; margin-top: 6px; line-height: 1.45; }
.chat-urgent { color: #a03924 !important; font-weight: 700; }
.chat-detail { display: flex; flex-direction: column; min-width: 0; }
.chat-detail-header { padding: 24px; border-bottom: 1px solid var(--line); }
.chat-detail-header h2 { font-size: 34px; margin-bottom: 10px; }
.chat-intake { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.chat-intake dt { color: #53606b; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.chat-intake dd { margin: 5px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-intake .chat-need { grid-column: 1 / -1; }
.chat-control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 24px; }
.chat-control-row button { border: 1px solid var(--line); }
.chat-control-row .chat-mode { width: 100%; font-size: 12px; color: #53606b; margin: 0; line-height: 1.5; }
.chat-admin-thread { min-height: 160px; max-height: 430px; flex: 1; }
.chat-admin-composer { padding: 16px 24px; }
.chat-empty { padding: 32px; color: #53606b; font-size: 14px; line-height: 1.6; }
@media (max-width: 820px) {
  .chat-workspace { grid-template-columns: 1fr; }
  .chat-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-conversation-list { max-height: 220px; }
  .chat-dashboard-header { align-items: start; }
}
@media (max-width: 480px) {
  .chat-launcher { right: 16px; bottom: 16px; padding: 13px 16px; }
  .chat-panel { right: 16px; bottom: 80px; height: min(620px, calc(100dvh - 100px)); }
  .chat-header { padding: 16px; }
  .chat-intake { grid-template-columns: 1fr; }
  .chat-admin .page-head h1 { font-size: 52px; }
  .chat-admin-composer, .chat-detail-header, .chat-control-row { padding: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .chat-launcher { transition: background .15s ease, transform .15s ease; }
  .chat-launcher:hover { transform: translateY(-2px); }
}
