@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #10151f;
  --surface: #1a2331;
  --border: #303e50;
  --text: #f3f6fb;
  --muted: #a8b6c9;
  --accent: #8be5d1;
  --accent-soft: #8be5d112;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: #090d14; color: var(--text); font-size: 14px; line-height: 1.8; }
button, input { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.app-shell { width: 100%; max-width: 860px; height: 100dvh; margin: auto; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.app-shell[data-feed="onair"] { --accent: #ffb3a7; --accent-soft: #ffb3a713; }
.topbar { flex: none; min-height: 70px; padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #141c28; border-bottom: 1px solid #263244; z-index: 2; }
.brand, .top-actions, .sender { display: flex; align-items: center; }
.brand { gap: 10px; }
.brand strong { display: block; font-size: 16px; line-height: 1.5; white-space: nowrap; }
.brand small { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; color: #9bebd8; background: linear-gradient(145deg, #254a47, #193230); border: 1px solid #376359; }
.top-actions { gap: 8px; }
.connection { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #c1ccdb; white-space: nowrap; padding: 5px 9px; border-radius: 20px; background: #ffffff05; border: 1px solid #344154; }
#connection-label { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #e7a7a7; flex: none; }
.connection[data-state="connected"] { color: #a1ead7; background: #8be5d109; border-color: #33564e; }
.connection[data-state="connected"] .status-dot { background: #8be5d1; box-shadow: 0 0 8px #8be5d13d; }
.connection[data-state="connecting"] { color: #f2d59c; }
.connection[data-state="connecting"] .status-dot { background: #f2d59c; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; background: transparent; border: 1px solid #2c394b; border-radius: 11px; color: #b7c5d6; }
.icon-button:hover { background: #243146; color: var(--text); }
.text-button { min-height: 36px; padding: 4px 2px; background: none; border: 0; color: var(--accent); font-size: 10px; white-space: nowrap; }
.inbox-layout { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.feed-tabs { display: flex; flex: none; gap: 5px; padding: 7px; margin: 13px 16px 5px; background: #090e17; border: 1px solid #263244; border-radius: 15px; }
.feed-tab { flex: 1; min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #a5b4c7; font-size: 12px; transition: background .15s, color .15s; }
.feed-tab svg { width: 19px; height: 19px; }
.feed-tab[aria-selected="true"] { color: #a8f1df; background: #203b3b; border-color: #355b58; box-shadow: 0 2px 5px #0002; }
.onair-tab[aria-selected="true"] { color: #ffd2c9; background: #3a2b30; border-color: #67484c; }
.tab-count { min-width: 20px; padding: 0 5px; border-radius: 6px; background: #ffffff0a; color: #ccd6e3; font-size: 10px; line-height: 1.8; }
.feed-tab[data-unread="true"]::after { content: ""; position: absolute; top: 8px; left: 9px; width: 6px; height: 6px; border-radius: 50%; background: #8be5d1; box-shadow: 0 0 0 3px #8be5d114; }
.onair-tab[data-unread="true"]::after { background: #ffb3a7; box-shadow: 0 0 0 3px #ffb3a714; }
.message-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px max(28px, env(safe-area-inset-bottom)); scrollbar-width: thin; scrollbar-color: #3b4a61 transparent; background: radial-gradient(ellipse at 100% 0, #8be5d104, transparent 55%); }
[data-feed="onair"] .message-scroll { background: radial-gradient(ellipse at 100% 0, #ffb3a705, transparent 55%); }
.messages { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.date-divider { align-self: center; display: flex; align-items: center; gap: 10px; font-size: 10px; color: #aab8ca; padding: 4px 12px; margin: 9px 0 2px; border: 1px solid #293446; border-radius: 18px; background: #171f2b; }
.message-row { width: 100%; max-width: 660px; padding: 13px 15px 16px; background: linear-gradient(135deg, #1e2939, #192230); border: 1px solid #344257; border-radius: 17px 5px 17px 17px; box-shadow: 0 3px 12px #00000015; overflow-wrap: anywhere; }
.message-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; margin-bottom: 9px; border-bottom: 1px solid #ffffff09; line-height: 1.6; }
.sender { gap: 8px; min-width: 0; }
.sender-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); flex: none; }
.sender-mark svg { width: 16px; height: 16px; }
.phone { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .25px; font-family: "Segoe UI", Tahoma, sans-serif; }
.message-meta time { color: #aab8ca; font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.message-bubble { font-size: 15px; line-height: 2.1; white-space: pre-wrap; unicode-bidi: plaintext; overflow-wrap: anywhere; color: #f4f6fb; }
.history-actions { text-align: center; padding: 5px 0 14px; }
.secondary-button { background: #1c293a; color: #c7d6e7; border: 1px solid #3a4c64; border-radius: 12px; padding: 7px 17px; font-size: 11px; min-height: 38px; }
.history-notice { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 7px 16px; padding: 8px 12px; border-radius: 10px; background: #352c24; border: 1px solid #5d4932; color: #ffdfa8; font-size: 11px; flex: none; }
.history-notice .text-button { color: #ffdfa8; }
.empty-state { min-height: 52dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--muted); padding: 24px; }
.empty-icon, .login-icon { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #35465d; border-radius: 22px; background: linear-gradient(135deg, #27374b, #1a2535); color: var(--accent); }
.empty-icon svg { width: 29px; height: 29px; }
.empty-state h2 { font-size: 15px; color: #e2e9f2; font-weight: 500; margin: 20px 0 7px; }
.empty-state p { max-width: 250px; font-size: 12px; line-height: 2; margin: 0; }
.new-message-button { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 18px; padding: 9px 16px; min-height: 42px; border-radius: 23px; background: var(--accent); color: #17232b; border: 1px solid #ffffff30; box-shadow: 0 5px 24px #0006; font-size: 12px; font-weight: bold; }
.login-layout { flex: 1; min-height: 0; overflow-y: auto; display: grid; place-items: center; padding: 28px 22px; background: radial-gradient(ellipse at 50% 30%, #8be5d108, transparent 65%); }
.login-card { width: 100%; max-width: 340px; }
.login-icon { width: 52px; height: 52px; border-radius: 17px; background: #1d3636; border-color: #345653; color: #9bebd8; }
.login-icon svg { width: 25px; height: 25px; }
.login-card h1 { font-size: 24px; margin: 20px 0 6px; }
.login-card p { color: var(--muted); font-size: 12px; margin: 0 0 28px; }
.login-card label { display: block; color: #c8d3e2; font-size: 12px; margin-bottom: 8px; }
.password-field { display: flex; align-items: center; background: #192434; border: 1px solid #3a4b63; border-radius: 13px; overflow: hidden; transition: border-color .15s; }
.password-field:focus-within { border-color: #8be5d1; box-shadow: 0 0 0 3px #8be5d10b; }
.password-field input { width: 100%; min-width: 0; border: 0; background: none; padding: 14px; outline: none; font-size: 16px; }
.password-field button { flex: none; display: grid; place-items: center; width: 44px; height: 50px; border: 0; background: none; color: var(--muted); }
.primary-button { width: 100%; border: 1px solid #c6fff426; border-radius: 13px; padding: 13px 16px; margin-top: 16px; background: linear-gradient(135deg, #a0edda, #73d3c2); color: #14342e; font-weight: bold; box-shadow: 0 5px 18px #8be5d10c; }
.login-card small { display: block; text-align: center; color: var(--muted); font-size: 10px; margin-top: 20px; }
.login-card .error-text { color: #ffb9b9; font-size: 12px; margin: 12px 0 0; }
@media (min-width: 640px) {
  .app-shell { border-inline: 1px solid #283447; box-shadow: 0 0 70px #0004; }
  .topbar { padding-inline: 28px; min-height: 78px; }
  .feed-tabs { margin-inline: 26px; }
  .message-scroll { padding-inline: 28px; }
  .messages { gap: 16px; }
  .message-row { padding: 15px 20px 18px; }
  .message-bubble { font-size: 16px; }
}
@media (max-width: 359px) {
  .topbar { padding-inline: 12px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 32px; border-radius: 10px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 8px; }
  .top-actions { gap: 5px; }
  .connection { font-size: 9px; padding-inline: 7px; }
  #connection-label { max-width: 72px; }
  .text-button { font-size: 9px; }
  .feed-tabs { margin-inline: 12px; }
  .message-scroll { padding-inline: 12px; }
  .message-row { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
