:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: #0e1621; color: #e8f0f7; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #0e1621; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #1b3349, #0e1621 52%); }
.login-panel { width: min(390px, 100%); padding: 36px; background: #172331; border: 1px solid #2a3b4b; border-radius: 12px; box-shadow: 0 24px 80px #07101a99; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #2aabee; color: white; }
.brand-mark svg { width: 25px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 29px; letter-spacing: 0; }
h2 { margin-bottom: 4px; font-size: 21px; }
h3 { margin-bottom: 8px; font-size: 18px; }
.eyebrow { margin: 20px 0 7px; color: #7f9bb2; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.muted { color: #8da5b8; line-height: 1.55; }
form { margin-top: 26px; }
label { display: block; margin: 14px 0; color: #aec3d3; font-size: 13px; }
input { width: 100%; margin-top: 7px; padding: 11px 12px; color: #e8f0f7; background: #101a25; border: 1px solid #314657; border-radius: 7px; outline: none; }
input:focus { border-color: #2aabee; box-shadow: 0 0 0 3px #2aabee22; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 7px; padding: 11px 15px; font-weight: 700; }
.primary { width: 100%; margin-top: 12px; color: white; background: #2aabee; }
.secondary { color: #d9edf8; background: #263b4b; }
button svg { width: 16px; height: 16px; }
.error { min-height: 20px; margin: 12px 0 0; color: #ff8b8b; font-size: 13px; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 330px; flex: 0 0 330px; background: #172331; border-right: 1px solid #263847; }
.sidebar-head, .sidebar-tools, .content-head { display: flex; align-items: center; }
.sidebar-head { gap: 11px; padding: 18px; border-bottom: 1px solid #263847; }
.sidebar-head strong, .sidebar-head span { display: block; }
.sidebar-head span { margin-top: 3px; color: #8da5b8; font-size: 12px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #2aabee; color: white; font-size: 12px; font-weight: 800; }
.sidebar-head .icon-btn { margin-left: auto; }
.sidebar-tools { gap: 8px; padding: 12px; border-bottom: 1px solid #263847; }
.search-box { display: flex; align-items: center; flex: 1; gap: 8px; padding: 0 10px; background: #101a25; border-radius: 7px; color: #7891a4; }
.search-box input { margin: 0; padding: 9px 0; border: 0; box-shadow: none; background: transparent; }
.search-box svg { width: 16px; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #9bb2c3; background: transparent; border: 0; border-radius: 7px; }
.icon-btn:hover { color: white; background: #243847; }
.channel-list { padding: 8px; }
.channel-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 10px; color: #d9e7f0; text-align: left; background: transparent; border: 0; border-radius: 8px; }
.channel-item:hover, .channel-item.active { background: #22394a; }
.channel-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #3b5668; color: #d8edf8; font-weight: 700; }
.channel-copy { min-width: 0; flex: 1; }
.channel-copy strong, .channel-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-copy span { margin-top: 4px; color: #8199ab; font-size: 12px; }
.unread { min-width: 20px; padding: 3px 6px; color: white; background: #2aabee; border-radius: 10px; font-size: 11px; text-align: center; }
.content { min-width: 0; flex: 1; display: flex; flex-direction: column; background: #0e1621; }
.content-head { justify-content: space-between; padding: 18px 28px; min-height: 78px; border-bottom: 1px solid #263847; }
.content-head .eyebrow { margin: 0 0 4px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; color: #8da5b8; font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #718698; }
.status-pill.ok .dot { background: #4dd091; }
.status-pill.warn .dot { background: #f5be57; }
.status-pill.bad .dot { background: #f27878; }
.messages { width: min(100%, 980px); margin: 0 auto; padding: 22px 30px 80px; flex: 1; background: linear-gradient(135deg, #0e1823 25%, #101c28 25%, #101c28 50%, #0e1823 50%, #0e1823 75%, #101c28 75%); background-size: 34px 34px; }
.message { width: fit-content; max-width: min(760px, 88%); margin: 0 0 4px; padding: 7px 11px 8px; background: #182735; border: 1px solid #233a4a; border-radius: 10px 10px 10px 3px; box-shadow: 0 1px 1px #07111a66; }
.message.has-media { max-width: 620px; padding: 5px 5px 7px; }
.message-meta { display: flex; align-items: baseline; gap: 9px; min-height: 15px; margin: 0 3px 3px; color: #2aabee; font-size: 12px; }
.message-meta time { color: #71899b; }
.message-text { margin: 0 3px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.date-divider { display: flex; justify-content: center; margin: 15px 0 11px; }
.date-divider span { padding: 5px 10px; color: #b6cbd8; background: #263b4a; border-radius: 11px; box-shadow: 0 1px 2px #07111a99; font-size: 11px; }
.media-image-link { display: block; max-width: 610px; margin: 0; }
.media-image { display: block; width: auto; max-width: 100%; max-height: 620px; border-radius: 7px; background: #0b1219; }
.media-video { display: block; width: min(610px, 100%); max-height: 520px; border-radius: 7px; background: #0b1219; }
.media-audio { display: block; width: min(440px, 100%); margin: 4px 0; }
.media-file { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 10px 0 4px; padding: 12px; color: #bde5f8; background: #203444; border: 1px solid #315268; border-radius: 7px; text-decoration: none; }
.media-file span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-file svg { width: 18px; flex: 0 0 auto; }
.message-link { display: inline-flex; align-items: center; gap: 4px; margin: 7px 3px 0; color: #6fc8f4; font-size: 12px; text-decoration: none; }
.empty-state { max-width: 760px; margin: 11vh auto; padding: 42px 28px; color: #8da5b8; text-align: center; }
.empty-state > svg { width: 34px; height: 34px; margin-bottom: 14px; color: #4e6c7e; }
.qr-layout { display: flex; align-items: center; justify-content: center; gap: 35px; text-align: left; }
.qr-frame { width: 220px; height: 220px; display: grid; place-items: center; padding: 12px; background: white; border-radius: 10px; }
.qr-frame img { display: block; width: 196px; height: 196px; }
@media (max-width: 720px) { .sidebar { width: 100%; flex-basis: 100%; } .app-shell { display: block; } .content { min-height: 70vh; } .sidebar { max-height: 46vh; overflow: auto; } .content-head { padding: 16px; } .messages { padding: 18px 16px 60px; } .qr-layout { flex-direction: column; text-align: center; } }
