.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.contact-choice h2 { font-size: 29px; line-height: 1.16; }
.contact-channel-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-channel-actions .button-outline { border-color: #151515; }
.selected-service { background: #fff4b8; color: #151515; padding: 10px 13px; border-radius: 7px; font-size: 13px; font-weight: 600; margin-bottom: 15px; }
.contact-options { display: grid; gap: 12px; margin-top: 23px; }
.contact-option { display: flex; align-items: center; gap: 15px; padding: 19px 16px; background: var(--color-background); border: 1px solid var(--color-border); border-radius: 10px; text-align: left; color: var(--color-text); transition: border-color .2s, transform .2s; }
.contact-option:hover { border-color: #b79300; transform: translateY(-2px); }
.contact-option > .bi:first-child { font-size: 27px; width: 32px; flex-shrink: 0; }
.contact-option > .bi:last-child { margin-left: auto; }
.contact-option strong { display: block; font-size: 15px; }
.contact-option small { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 5px; line-height: 1.6; }
.service-option { width: 100%; border: 0; background: none; color: var(--color-text); display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 0; text-align: left; font-size: 14px; line-height: 1.6; transition: padding .2s, background .2s; }
.service-option:hover { padding-left: 7px; background: var(--color-surface); }
.chat-unread { position: absolute; right: -3px; top: -4px; min-width: 21px; height: 21px; padding-inline: 5px; display: grid; place-items: center; background: #151515; color: #ffd326; border: 2px solid #ffd326; font-size: 11px; line-height: 1; border-radius: 30px; }
.chat-dialog { position: fixed; inset: auto 22px 20px auto; margin: 0; padding: 0; width: 420px; height: min(680px, 88dvh); max-width: calc(100vw - 32px); max-height: 90dvh; border: 1px solid var(--color-border); border-radius: 15px; background: var(--color-background); color: var(--color-text); overflow: hidden; box-shadow: 0 20px 80px rgb(0 0 0 / 25%); }
.chat-dialog[open] { display: flex; flex-direction: column; animation: dialog-open .25s ease both; }
.chat-dialog::backdrop { background: rgb(0 0 0 / 30%); animation: backdrop-open .2s ease both; }
.chat-header { display: flex; align-items: center; flex-shrink: 0; gap: 11px; padding: 17px; background: #151515; color: #fff; }
.chat-header img { flex-shrink: 0; }
.chat-header h2 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; line-height: 1.35; }
.chat-header p { font-size: 11px; color: #d1d1d1; margin-top: 3px; }
.chat-header .icon-button { margin-left: auto; flex-shrink: 0; font-size: 17px; }
.chat-header .icon-button:hover { background: #333; }
.chat-nav { display: flex; flex-shrink: 0; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.chat-nav button { display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 0; font-size: 11px; color: var(--color-text); }
.chat-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-scroll { overflow-y: auto; padding: 22px; flex: 1; min-height: 0; }
.chat-intro h3 { font-size: 21px; letter-spacing: -.025em; line-height: 1.25; }
.chat-intro p { font-size: 12px; line-height: 1.7; color: var(--color-text-muted); margin: 9px 0 19px; }
.new-chat-form label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.new-chat-form input:not([type="file"]), .new-chat-form select, .new-chat-form textarea { display: block; width: 100%; color: var(--color-text); background: var(--color-background); border: 1px solid var(--color-border); border-radius: 7px; padding: 11px; font-size: 14px; margin-bottom: 17px; }
.new-chat-form textarea { resize: vertical; min-height: 85px; }
.new-chat-form input[type="file"] { max-width: 100%; font-size: 11px; margin-bottom: 10px; }
.new-chat-form .file-picker { display: flex; align-items: center; gap: 7px; font-weight: 500; margin-bottom: 9px; }
.file-hint { display: block; font-size: 10px; color: var(--color-text-muted); line-height: 1.7; margin-bottom: 18px; }
.new-chat-form .button { width: 100%; font-size: 13px; }
.chat-text-button { display: block; border: 0; background: none; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; margin: 17px auto 0; }
.chat-error { background: #fff0f0; border: 1px solid #f1bcbc; color: #962323; padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.7; margin: 8px 0 13px; }
.conversation-summary { padding: 12px 17px; border-bottom: 1px solid var(--color-border); display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.conversation-summary strong { font-weight: 600; }
.conversation-summary span { color: var(--color-text-muted); }
.chat-messages { min-height: 0; flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.chat-message { max-width: 88%; padding: 11px 13px 8px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 11px 11px 11px 2px; font-size: 13px; line-height: 1.65; word-break: break-word; }
.chat-message.own { align-self: flex-end; background: #fff4b8; color: #151515; border-color: #f0d76e; border-radius: 11px 11px 2px 11px; }
.chat-message p { white-space: pre-wrap; }
.message-author { display: block; font-size: 10px; font-weight: 650; margin-bottom: 4px; }
.chat-message time { display: block; text-align: right; margin-top: 5px; font-size: 9px; opacity: .7; }
.message-file { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.message-file > .bi { font-size: 26px; flex-shrink: 0; }
.message-file > span { min-width: 0; }
.message-file strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.message-file small { display: block; font-size: 10px; opacity: .75; }
.message-composer { padding: 12px 16px 7px; border-top: 1px solid var(--color-border); background: var(--color-background); flex-shrink: 0; }
.message-composer textarea { resize: none; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); width: 100%; font-size: 13px; line-height: 1.6; display: block; }
.composer-toolbar { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.attach-button { display: flex; gap: 6px; align-items: center; font-size: 11px; cursor: pointer; }
.attach-button > .bi { font-size: 21px; }
.composer-toolbar .button { margin-left: auto; min-height: 37px; padding: 8px 12px; font-size: 12px; gap: 7px; }
.file-count { font-size: 10px; background: #ffd326; color: #151515; min-width: 0; padding-inline: 4px; border-radius: 3px; }
.file-count:empty { display: none; }
.composer-hint { padding: 0 16px 10px; font-size: 9px; color: var(--color-text-muted); line-height: 1.5; background: var(--color-background); flex-shrink: 0; }
.chat-status { padding-inline: 15px; }
.chat-status:empty { display: none; }
.customer-history { display: grid; gap: 9px; margin-bottom: 20px; }
.history-item { border: 1px solid var(--color-border); border-radius: 9px; padding: 13px; background: var(--color-background); color: var(--color-text); display: flex; align-items: center; gap: 13px; text-align: left; }
.history-item > span { min-width: 0; flex: 1; }
.history-item strong { display: block; font-size: 13px; }
.history-item small { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; color: var(--color-text-muted); font-size: 11px; margin-top: 6px; }
.history-item:hover { border-color: #b79300; }
.empty-chat { font-size: 13px; color: var(--color-text-muted); padding: 22px; }
.count-badge { background: #ffd326; color: #151515; min-width: 23px; height: 23px; padding: 0 6px; font-size: 11px; line-height: 23px; text-align: center; border-radius: 20px; flex-shrink: 0; }
.admin-app { padding-bottom: 0; }
.admin-loading { padding: 30px; }
.admin-login { width: min(390px, calc(100% - 40px)); margin: 12dvh auto; padding: 30px; border: 1px solid var(--color-border); border-radius: 15px; background: var(--color-background); box-shadow: 0 10px 40px rgb(0 0 0 / 5%); }
.admin-login-brand, .admin-wordmark { font-weight: 750; font-size: 23px; letter-spacing: -.04em; }
.admin-login-brand span, .admin-wordmark span { color: #a78300; }
.admin-login > p { font-size: 12px; color: var(--color-text-muted); margin: 9px 0 25px; }
.admin-login label { display: block; font-size: 13px; margin-bottom: 9px; }
.admin-login input { width: 100%; border: 1px solid var(--color-border); border-radius: 7px; padding: 11px; background: var(--color-surface); color: var(--color-text); font-size: 16px; }
.admin-login .button { width: 100%; margin-top: 20px; }
.admin-return { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 23px; }
.admin-header { height: 73px; padding: 15px 28px; display: flex; align-items: center; gap: 27px; border-bottom: 1px solid var(--color-border); background: var(--color-background); }
.admin-header-label { font-size: 13px; color: var(--color-text-muted); }
.admin-header-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.notification-button { position: relative; font-size: 23px; }
.notification-button .count-badge { position: absolute; top: -3px; right: -5px; min-width: 20px; height: 20px; font-size: 10px; line-height: 20px; }
.admin-logout { display: flex; align-items: center; gap: 7px; padding: 8px 0; font-size: 12px; background: none; border: 0; }
.admin-workspace { height: calc(100dvh - 73px); display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.admin-sidebar { border-right: 1px solid var(--color-border); overflow-y: auto; padding: 20px 15px; }
.admin-sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.admin-sidebar h1 { font-size: 23px; letter-spacing: -.035em; }
.admin-sidebar input { width: 100%; padding: 11px; border: 1px solid var(--color-border); border-radius: 7px; font-size: 13px; background: var(--color-surface); color: var(--color-text); }
.inbox-filters { display: flex; gap: 7px; margin-block: 15px; }
.inbox-filters button { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; padding: 6px 14px; font-size: 11px; }
.inbox-filters button[aria-pressed="true"] { background: #ffd326; color: #151515; border-color: #ffd326; }
.admin-ticket { display: flex; width: 100%; align-items: center; gap: 10px; padding: 14px 10px; background: var(--color-background); color: var(--color-text); border: 0; border-bottom: 1px solid var(--color-border); border-left: 3px solid transparent; text-align: left; }
.admin-ticket.selected { background: #fff7d6; color: #151515; border-left-color: #d2ab10; }
.ticket-avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: #e9e9e3; color: #151515; font-weight: 650; flex-shrink: 0; }
.ticket-info { min-width: 0; flex: 1; }
.ticket-info strong { display: block; font-size: 13px; }
.ticket-info > span { display: block; font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; opacity: .7; margin-top: 5px; }
.admin-conversation { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--color-background); }
.admin-empty { margin: auto; text-align: center; padding: 30px; }
.admin-empty > .bi { font-size: 50px; }
.admin-empty h2 { font-size: 25px; margin-block: 20px 12px; }
.admin-empty p { font-size: 13px; color: var(--color-text-muted); }
.admin-conversation-header { display: flex; gap: 13px; align-items: center; padding: 17px 23px; border-bottom: 1px solid var(--color-border); }
.admin-conversation-header h2 { font-size: 19px; letter-spacing: -.02em; }
.admin-conversation-header p { font-size: 12px; color: var(--color-text-muted); margin-top: 5px; }
.category-pill { margin-left: auto; font-size: 11px; padding: 5px 10px; background: #ffd326; color: #151515; border-radius: 5px; }
.admin-back { display: none; }
.admin-messages { padding: 25px; }
.admin-conversation > .chat-error { margin-inline: 20px; }
.admin-conversation .message-composer { padding: 15px 23px 8px; }
.admin-conversation .composer-hint { padding-left: 23px; }
html[data-theme="dark"] .chat-error { color: #ffbdbd; background: #3a1d1d; border-color: #733838; }
html[data-theme="dark"] .chat-message.own { background: #584a17; color: #fff; border-color: #7f6b22; }
html[data-theme="dark"] .admin-ticket.selected { background: #3b3317; color: #fff; }
html[data-theme="dark"] .admin-login-brand span, html[data-theme="dark"] .admin-wordmark span { color: #ffd326; }

@media (max-width: 700px) {
  .chat-dialog { inset: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .chat-header { padding: 14px 16px; }
  .chat-header h2 { font-size: 16px; }
  .chat-header p { font-size: 11px; }
  .chat-scroll { padding: 20px; }
  .new-chat-form input:not([type="file"]), .new-chat-form textarea, .new-chat-form select { font-size: 16px; }
  .chat-message { font-size: 14px; }
  .message-composer textarea { font-size: 16px; }
  .composer-toolbar .button { min-height: 41px; }
  .attach-button span { font-size: 11px; }
  .message-composer { padding-bottom: 8px; }
  .composer-hint { padding-bottom: max(10px, env(safe-area-inset-bottom)); font-size: 10px; }
  .admin-header { padding: 12px 16px; height: 67px; gap: 10px; }
  .admin-wordmark { font-size: 20px; }
  .admin-header-label { display: none; }
  .admin-header-actions { gap: 15px; }
  .admin-workspace { height: calc(100dvh - 67px); display: block; }
  .admin-sidebar { height: 100%; border: 0; }
  .admin-conversation { display: none; height: 100%; }
  .admin-workspace.ticket-open .admin-sidebar { display: none; }
  .admin-workspace.ticket-open .admin-conversation { display: flex; }
  .admin-back { display: inline-flex; }
  .category-pill { display: none; }
  .admin-conversation-header { padding: 13px 12px; }
  .admin-messages { padding: 17px; }
  .admin-conversation .message-composer { padding-inline: 15px; }
  .contact-choice h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-dialog[open], .chat-dialog::backdrop { animation: none !important; }
}
