:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #10233e;
  background: #eaf0f8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #8ec7ff; outline-offset: 2px; }

.auth-page {
  align-items: center;
  background:
    radial-gradient(circle at 16% 15%, rgba(104, 191, 255, .52), transparent 28rem),
    radial-gradient(circle at 88% 85%, rgba(60, 217, 177, .28), transparent 25rem),
    linear-gradient(135deg, #081b35, #1b4072 57%, #163252);
  display: grid;
  min-height: 100vh;
  padding: 32px;
}

.auth-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 15, 43, .35);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, .95fr) minmax(310px, 1.05fr);
  margin: auto;
  max-width: 950px;
  overflow: hidden;
  width: min(100%, 950px);
}

.auth-intro { background: #102a4d; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 42px; }
.brand-lockup { align-items: center; display: flex; gap: 12px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { align-items: center; background: linear-gradient(145deg, #76d8ff, #37a4e8); border-radius: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); color: #062442; display: inline-flex; font-size: 20px; font-weight: 900; height: 38px; justify-content: center; width: 38px; }
.auth-intro h1 { font-size: clamp(30px, 4vw, 43px); letter-spacing: -.055em; line-height: 1.06; margin: 48px 0 16px; }
.auth-intro p { color: #c4dcf4; line-height: 1.55; margin: 0; }
.local-badge { align-items: center; color: #aae7d1; display: flex; font-size: 13px; gap: 8px; margin-top: 34px; }
.local-badge::before { background: #6ee7bd; border-radius: 50%; content: ""; height: 8px; width: 8px; }
.auth-form-area { align-self: center; padding: 40px 42px; }
.auth-form-area h2 { font-size: 26px; letter-spacing: -.035em; margin: 0 0 7px; }
.auth-subtitle { color: #66778c; font-size: 14px; line-height: 1.5; margin: 0 0 26px; }
.form-stack { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field label { color: #344861; font-size: 13px; font-weight: 650; }
.field input, .field textarea, .field select { background: #f7f9fc; border: 1px solid #d8e1ec; border-radius: 11px; color: #132945; padding: 12px 13px; transition: border .15s, box-shadow .15s; width: 100%; }
.field textarea { min-height: 85px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { background: white; border-color: #338bd0; box-shadow: 0 0 0 3px rgba(71, 160, 223, .14); outline: none; }
.primary-button, .secondary-button, .quiet-button, .danger-button, .icon-button { border: 0; border-radius: 11px; font-weight: 700; transition: transform .15s, background .15s, box-shadow .15s; }
.primary-button { background: linear-gradient(135deg, #167fc3, #236ad0); box-shadow: 0 8px 18px rgba(27, 98, 184, .24); color: white; padding: 12px 16px; }
.primary-button:hover { background: linear-gradient(135deg, #116eaf, #1d5fbd); transform: translateY(-1px); }
.secondary-button { background: #e7f2ff; color: #1764a3; padding: 11px 14px; }
.secondary-button:hover { background: #d8eaff; }
.quiet-button { background: transparent; color: #35637e; padding: 8px 10px; }
.quiet-button:hover { background: #eef4f9; }
.danger-button { background: #d9445b; color: white; padding: 11px 14px; }
.form-switch { color: #67768a; font-size: 14px; margin: 19px 0 0; }
.link-button { background: transparent; border: 0; color: #1777bb; font-weight: 700; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.demo-credentials { background: #f0f7fc; border: 1px solid #dbeaf5; border-radius: 12px; color: #4a647a; font-size: 12px; line-height: 1.55; margin-top: 25px; padding: 12px 14px; }
.demo-credentials strong { color: #1a4565; }

.messenger { background: #f4f7fb; display: grid; grid-template-columns: 330px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.sidebar { background: white; border-right: 1px solid #dce6ef; display: flex; flex-direction: column; min-width: 0; }
.sidebar-head { border-bottom: 1px solid #edf1f5; padding: 19px 17px 14px; }
.sidebar-top { align-items: center; display: flex; justify-content: space-between; }
.profile-button { align-items: center; background: transparent; border: 0; color: #1c3753; display: flex; gap: 10px; max-width: calc(100% - 90px); padding: 0; text-align: left; }
.profile-name { display: block; font-size: 14px; font-weight: 760; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-status { color: #489071; display: block; font-size: 11px; margin-top: 2px; }
.avatar { align-items: center; background: linear-gradient(145deg, #c7e8ff, #82b9eb); border-radius: 50%; color: #17476e; display: inline-flex; flex: 0 0 auto; font-size: 13px; font-weight: 800; height: 36px; justify-content: center; width: 36px; }
.avatar.large { font-size: 18px; height: 45px; width: 45px; }
.sidebar-actions { display: flex; gap: 7px; }
.global-search-button, .saved-messages-button, .employee-directory-button { align-items: center; background: #edf5fa; border: 1px solid #d6e7f1; border-radius: 10px; color: #246387; display: inline-flex; font-size: 20px; height: 37px; justify-content: center; width: 37px; }
.global-search-button:hover, .saved-messages-button:hover, .employee-directory-button:hover { background: #dceef8; color: #125b86; }
.new-button { align-items: center; background: #167cc2; border: 0; border-radius: 10px; color: white; display: inline-flex; font-size: 21px; height: 37px; justify-content: center; width: 37px; }
.new-button:hover { background: #0f6eaf; }
.search-box { align-items: center; background: #f2f5f8; border-radius: 10px; color: #789; display: flex; gap: 8px; margin-top: 15px; padding: 9px 11px; }
.search-box input { background: transparent; border: 0; color: #203950; min-width: 0; outline: none; width: 100%; }
.chat-filter-tabs { display: flex; gap: 6px; margin-top: 11px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chat-filter-tabs::-webkit-scrollbar { display: none; }
.chat-filter-tabs button { align-items: center; background: #eef5fa; border: 1px solid #dce9f1; border-radius: 999px; color: #456a83; display: inline-flex; flex: 0 0 auto; font-size: 11px; font-weight: 800; gap: 5px; min-height: 29px; padding: 0 10px; }
.chat-filter-tabs button:hover { background: #e0f0f8; color: #195d87; }
.chat-filter-tabs button.active { background: #177abd; border-color: #177abd; color: white; }
.chat-filter-count { align-items: center; background: rgba(255,255,255,.22); border-radius: 999px; display: inline-flex; font-size: 10px; justify-content: center; min-width: 17px; padding: 2px 5px; }
.sidebar-scroll { flex: 1; overflow: auto; padding: 10px 8px 18px; }
.sidebar-empty { padding: 0 9px; }
.chat-section-title { color: #7790a6; font-size: 11px; font-weight: 780; letter-spacing: .065em; margin: 15px 9px 7px; text-transform: uppercase; }
.conversation-item { align-items: center; background: transparent; border: 0; border-radius: 12px; color: #203a55; display: flex; gap: 10px; padding: 10px 9px; text-align: left; width: 100%; }
.conversation-item:hover { background: #edf5fb; }
.conversation-item.active { background: #dceefb; color: #113e63; }
.conversation-icon { align-items: center; background: #edf1f5; border-radius: 10px; color: #4b7191; display: inline-flex; flex: 0 0 auto; font-size: 16px; font-weight: 760; height: 36px; justify-content: center; width: 36px; }
.conversation-item.channel .conversation-icon { background: #e9efff; color: #4469b5; }
.conversation-copy { min-width: 0; flex: 1; }
.conversation-row { align-items: baseline; display: flex; gap: 8px; justify-content: space-between; }
.conversation-name { font-size: 13px; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-time { color: #90a0b1; flex: 0 0 auto; font-size: 10px; }
.conversation-preview { color: #7b8c9e; font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-draft-label { color: #d75b47; font-weight: 800; }
.conversation-muted-indicator,
.conversation-pin-indicator,
.conversation-pin-action { align-items: center; color: #86a9c2; display: inline-flex; flex: 0 0 auto; height: 24px; justify-content: center; width: 24px; }
.conversation-muted-indicator .ui-icon,
.conversation-pin-indicator .ui-icon,
.conversation-pin-action .ui-icon { height: 15px; width: 15px; }
.conversation-muted-indicator { color: #8ea7b8; }
.conversation-pin-action { background: rgba(255,255,255,.06); border-radius: 7px; opacity: 0; }
.conversation-pin-action:hover,
.conversation-pin-action:focus-visible { background: rgba(76,157,224,.2); color: #e9f7ff; outline: none; opacity: 1; }
.conversation-item:hover .conversation-pin-action,
.conversation-item:focus-within .conversation-pin-action { opacity: 1; }
.conversation-item:not(.pinned) .conversation-pin-indicator { display: none; }
.conversation-item.pinned .conversation-pin-indicator { color: #8fcff6; }
.conversation-item.muted .conversation-unread { background: #7f94a3; }
.conversation-unread { align-items: center; background: #177abd; border-radius: 10px; color: white; display: inline-flex; flex: 0 0 auto; font-size: 10px; font-weight: 800; justify-content: center; line-height: 1; min-height: 19px; min-width: 19px; padding: 3px 6px; }
.conversation-mention-badge { align-items: center; background: #e5f4ff; border: 1px solid #9acdea; border-radius: 999px; color: #1170a8; display: inline-flex; flex: 0 0 auto; font-size: 12px; font-weight: 900; height: 20px; justify-content: center; line-height: 1; min-width: 20px; padding: 0 5px; }
.conversation-item.active .conversation-unread { background: #ffffff; box-shadow: 0 1px 3px rgba(30,84,120,.18); color: #176a9d; }
.conversation-item.active .conversation-mention-badge { background: #ffffff; border-color: rgba(255,255,255,.75); box-shadow: 0 1px 3px rgba(30,84,120,.18); color: #176a9d; }
.community-label { align-items: center; color: #55738d; display: flex; font-size: 12px; font-weight: 750; gap: 7px; margin: 14px 9px 4px; }
.community-label::before { background: #5cb3df; border-radius: 4px; content: ""; height: 15px; width: 4px; }

.room { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; position: relative; }
.composer-drop-overlay { align-items: center; background: rgba(16, 97, 153, .12); border: 2px dashed rgba(54, 146, 200, .5); border-radius: 18px; color: #246a95; display: flex; inset: 16px; justify-content: center; opacity: 0; pointer-events: none; position: absolute; transform: scale(.985); transition: opacity .14s ease, transform .14s ease; z-index: 12; }
.room.drag-over .composer-drop-overlay { opacity: 1; transform: scale(1); }
.composer-drop-overlay > div { background: rgba(255,255,255,.9); border: 1px solid rgba(108, 164, 203, .32); border-radius: 16px; box-shadow: 0 12px 34px rgba(32, 72, 103, .16); display: grid; gap: 4px; min-width: min(360px, 78vw); padding: 22px; text-align: center; }
.composer-drop-overlay strong { font-size: 17px; }
.composer-drop-overlay span { color: #5f7d93; font-size: 13px; }
.room-header { align-items: center; background: rgba(255,255,255,.88); border-bottom: 1px solid #dfe8ef; display: flex; gap: 13px; justify-content: space-between; padding: 13px 22px; }
.room-top { min-width: 0; }
.room-head-left { align-items: center; display: flex; gap: 12px; min-width: 0; }
.room-identity-button { align-items: center; background: transparent; border: 0; color: inherit; display: flex; gap: 12px; min-width: 0; padding: 0; text-align: left; }
.room-identity-button:hover .room-title { color: #126da7; }
.room-title { font-size: 15px; font-weight: 780; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-subtitle { color: #718499; font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-tools { display: flex; gap: 7px; }
.icon-button { align-items: center; background: #edf4f9; color: #326a8d; display: inline-flex; font-size: 16px; height: 34px; justify-content: center; min-width: 34px; padding: 0 9px; }
.icon-button:hover { background: #dcecf7; color: #155986; }
.icon-button.leave-conversation { background: #fff1f3; color: #ad3d4e; font-size: 12px; }
.icon-button.leave-conversation:hover { background: #ffe3e8; color: #8f283a; }
.icon-button[disabled], .primary-button[disabled] { cursor: not-allowed; opacity: .55; transform: none; }
.pinned-message { align-items: center; background: #f7fbff; border-bottom: 1px solid #dce9f1; color: #31566f; display: flex; gap: 10px; min-width: 0; padding: 8px 22px; }
.pinned-message-icon { align-items: center; background: #dceffc; border-radius: 8px; color: #1c79af; display: inline-flex; flex: 0 0 auto; font-size: 16px; height: 30px; justify-content: center; width: 30px; }
.pinned-message-copy { display: grid; flex: 1; gap: 1px; min-width: 0; }
.pinned-message-label { color: #3c82ab; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.pinned-message-copy strong, .pinned-message-copy > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinned-message-copy strong { color: #20546f; font-size: 12px; }
.pinned-message-copy > span:last-child { color: #668398; font-size: 12px; }
.pinned-message-unpin { align-items: center; background: transparent; border: 0; border-radius: 8px; color: #5d819a; display: inline-flex; flex: 0 0 auto; font-size: 22px; height: 30px; justify-content: center; width: 30px; }
.pinned-message-unpin:hover { background: #e5f2f9; color: #1b6e9d; }
.messages {
  background-color: #edf4f8;
  background-image:
    radial-gradient(circle at 7px 7px, rgba(52, 117, 159, .075) 1.15px, transparent 1.65px),
    radial-gradient(circle at 21px 21px, rgba(84, 164, 133, .055) 1px, transparent 1.5px),
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(226,239,247,.62) 42%, rgba(241,246,251,.8));
  background-position: 0 0, 0 0, 0 0;
  background-size: 28px 28px, 28px 28px, 100% 100%;
  overflow: auto;
  padding: 21px max(22px, 5vw);
}
.message-day { background: rgba(255,255,255,.72); border: 1px solid rgba(107,151,181,.18); border-radius: 999px; color: #5d7690; display: table; font-size: 11px; font-weight: 760; margin: 4px auto 18px; padding: 4px 10px; text-align: center; }
.unread-separator { align-items: center; color: #2b7fad; display: grid; font-size: 11px; font-weight: 850; gap: 10px; grid-template-columns: 1fr auto 1fr; letter-spacing: .02em; margin: 14px 0 12px; text-transform: uppercase; }
.unread-separator::before,
.unread-separator::after { background: rgba(71, 150, 196, .32); content: ""; height: 1px; }
.unread-separator span { background: rgba(227, 243, 253, .95); border: 1px solid rgba(71, 150, 196, .22); border-radius: 999px; padding: 4px 10px; }
.message-row { display: flex; gap: 8px; margin: 4px 0; max-width: 780px; }
.message-row.mine { flex-direction: row-reverse; margin-left: auto; }
.message-wrap { max-width: min(570px, 76vw); position: relative; }
.message-avatar { align-self: flex-end; background: #dceefa; border: 0; border-radius: 50%; color: #326686; display: inline-flex; flex: 0 0 auto; font-size: 10px; font-weight: 780; height: 26px; justify-content: center; align-items: center; padding: 0; width: 26px; }
.message-avatar:hover { background: #c7e4f7; color: #155986; }
.message-bubble { background: rgba(255,255,255,.96); border: 1px solid rgba(205,221,232,.82); border-radius: 4px 15px 15px 15px; box-shadow: 0 1px 2px rgba(35,73,100,.06), 0 7px 18px rgba(35,73,100,.035); padding: 8px 11px 6px; }
.message-row.message-jump-highlight .message-bubble { animation: opk-message-jump-highlight 1.65s ease-out; }
.mine .message-bubble { background: linear-gradient(135deg, #dff5ff, #d2efff); border-color: rgba(160,218,247,.9); border-radius: 15px 4px 15px 15px; box-shadow: 0 1px 2px rgba(27,86,126,.07), 0 8px 19px rgba(42,135,190,.05); }
.message-bubble.deleted { background: #f2f5f7; border-style: dashed; color: #7d8c98; font-style: italic; }
.message-sender { background: transparent; border: 0; color: #23618c; display: block; font-size: 11px; font-weight: 780; margin: 0 0 3px; padding: 0; text-align: left; }
.message-sender:hover { color: #0e6fa8; text-decoration: underline; text-underline-offset: 2px; }
.employee-profile-card { display: grid; gap: 16px; }
.employee-profile-head { align-items: center; display: flex; gap: 12px; min-width: 0; }
.employee-profile-head > div { display: grid; gap: 2px; min-width: 0; }
.employee-profile-head strong { color: #1f3d53; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-profile-head span:last-child { color: #6a8094; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-profile-details { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.employee-profile-details li { background: #f5f9fc; border: 1px solid #dce9f1; border-radius: 10px; display: grid; gap: 3px; padding: 9px 10px; }
.employee-profile-details span { color: #6e8496; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.employee-profile-details strong { color: #233f56; font-size: 13px; overflow-wrap: anywhere; }
.forwarded-message { align-items: center; color: #4d86a7; display: flex; font-size: 11px; font-weight: 650; gap: 4px; line-height: 1.25; margin: 0 0 5px; overflow-wrap: anywhere; }
.forwarded-message > span:first-child { color: #287cae; font-size: 13px; line-height: 1; }
.forwarded-message strong { color: #23618c; font-weight: 780; }
.message-body { color: #1e364e; font-size: 14px; line-height: 1.42; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-mention { background: rgba(58, 143, 199, .12); border: 0; border-radius: 6px; color: #126da7; display: inline; font: inherit; font-weight: 760; margin: 0 1px; padding: 1px 3px; white-space: normal; }
.message-mention:hover, .message-mention:focus-visible { background: rgba(58, 143, 199, .22); color: #0b5f96; outline: none; }
.message-link { color: #0f73aa; font-weight: 720; overflow-wrap: anywhere; text-decoration: none; text-underline-offset: 2px; }
.message-link:hover, .message-link:focus-visible { color: #095e91; text-decoration: underline; }
.message-meta { color: #8194a5; float: right; font-size: 10px; margin: 3px -2px -1px 12px; }
.message-read-status { color: #6d8799; display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: -2px; margin-left: 4px; min-width: 8px; vertical-align: -1px; }
.message-read-status.peer-read { color: #2377a8; }
.reply-quote { background: rgba(88, 158, 204, .12); border: 0; border-left: 3px solid #4a9ecf; border-radius: 5px; color: #39627d; cursor: pointer; display: grid; font-size: 11px; gap: 1px; margin: 0 0 7px; max-width: 100%; padding: 5px 7px; text-align: left; width: 100%; }
.reply-quote strong { color: #26709e; }
.reply-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes opk-message-jump-highlight {
  0% { box-shadow: 0 0 0 0 rgba(53, 143, 205, .38), 0 2px 5px rgba(27,55,78,.045); transform: translateY(0); }
  18% { box-shadow: 0 0 0 7px rgba(53, 143, 205, .18), 0 7px 16px rgba(27,55,78,.13); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 0 rgba(53, 143, 205, 0), 0 2px 5px rgba(27,55,78,.045); transform: translateY(0); }
}
.attachment-list { display: grid; gap: 5px; margin-top: 7px; }
.attachment { align-items: center; background: rgba(255,255,255,.62); border: 1px solid rgba(94,149,188,.25); border-radius: 8px; color: #285c80; display: flex; font-size: 12px; gap: 8px; padding: 7px; text-decoration: none; }
.attachment:hover { background: white; }
.attachment > span:first-child { align-items: center; background: #d9ecf8; border-radius: 6px; display: inline-flex; font-size: 16px; height: 29px; justify-content: center; width: 29px; }
.attachment strong, .attachment small { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment small { color: #71889b; margin-top: 1px; }
.reaction-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0 2px; }
.mine .reaction-list { justify-content: flex-end; }
.reaction { background: white; border: 1px solid #d9e4ec; border-radius: 12px; color: #4c6578; font-size: 12px; padding: 2px 7px; }
.reaction:hover, .reaction.mine { background: #e4f4ff; border-color: #8ac3e5; }
.reaction span { font-size: 10px; margin-left: 3px; }
.message-tools { display: flex; gap: 2px; opacity: 0; padding: 2px; position: absolute; right: 0; top: -25px; transition: opacity .15s; z-index: 1; }
.message-row:hover .message-tools, .message-tools:focus-within { opacity: 1; }
.message-tools button { background: white; border: 1px solid #dbe6ee; border-radius: 6px; color: #54748b; font-size: 12px; height: 22px; min-width: 22px; padding: 0 4px; }
.message-tools button:hover { background: #e4f2fa; color: #1c6b9b; }
.message-tools button.saved { background: #e7f4ff; border-color: #90c9ec; color: #1674ab; }
.message-poll-card { background: rgba(240, 248, 255, .72); border: 1px solid rgba(127, 181, 216, .34); border-radius: 13px; display: grid; gap: 9px; margin-top: 4px; min-width: min(320px, 74vw); padding: 11px; }
.message-poll-head { align-items: center; color: #20465f; display: flex; gap: 8px; }
.message-poll-head .ui-icon { color: #2e86bd; flex: 0 0 auto; height: 18px; width: 18px; }
.message-poll-head strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.poll-options { display: grid; gap: 7px; }
.poll-option { background: white; border: 1px solid rgba(143, 190, 219, .45); border-radius: 10px; color: #254a62; display: grid; gap: 5px; padding: 8px 9px; text-align: left; width: 100%; }
.poll-option:hover, .poll-option:focus-visible { background: #eef8ff; border-color: #6db6e0; outline: none; }
.poll-option.selected { background: #e2f3ff; border-color: #4ba7dc; color: #164f76; }
.poll-option-main { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.poll-option-main strong { font-size: 13px; overflow-wrap: anywhere; }
.poll-option-main span { color: #347aa4; font-size: 12px; font-weight: 800; white-space: nowrap; }
.poll-option-bar { background: rgba(95, 157, 197, .18); border-radius: 999px; display: block; height: 5px; overflow: hidden; }
.poll-option-bar i { background: linear-gradient(90deg, #51a7dd, #7bd1f7); display: block; height: 100%; }
.poll-option small { color: #6b8497; font-size: 11px; }
.poll-summary { color: #6b8293; font-size: 11px; margin: 0; }
.reaction-picker { background: white; border: 1px solid #d4e1ea; border-radius: 9px; box-shadow: 0 7px 18px rgba(21,53,78,.18); display: flex; gap: 1px; padding: 4px; position: absolute; right: 0; top: -37px; z-index: 3; }
.reaction-picker button { background: transparent; border: 0; border-radius: 5px; font-size: 16px; padding: 3px; }
.reaction-picker button:hover { background: #edf5fa; }
.message-context-menu { background: white; border: 1px solid #d6e2eb; border-radius: 12px; box-shadow: 0 16px 42px rgba(10, 31, 51, .22); display: grid; gap: 2px; min-width: 190px; padding: 6px; position: fixed; z-index: 30; }
.message-context-menu button { align-items: center; background: transparent; border: 0; border-radius: 8px; color: #2d536d; display: flex; font-size: 13px; font-weight: 650; gap: 9px; justify-content: flex-start; padding: 8px 10px; text-align: left; }
.message-context-menu button:hover { background: #eef6fb; color: #126da7; }
.message-context-menu button.danger { color: #b43c4f; }
.message-context-menu button.danger:hover { background: #fff0f3; color: #8f293b; }
.message-context-menu .ui-icon { flex: 0 0 auto; height: 17px; width: 17px; }
.load-history { background: #e0eef7; border: 0; border-radius: 10px; color: #3d6d8b; display: block; font-size: 12px; font-weight: 700; margin: -5px auto 13px; padding: 7px 12px; }
.load-history:hover { background: #cee5f3; }
.jump-to-latest { background: #167cc2; border: 0; border-radius: 999px; box-shadow: 0 4px 12px rgba(22,124,194,.23); color: white; display: block; font-size: 12px; font-weight: 760; margin: 0 auto 11px; padding: 8px 13px; position: sticky; top: 7px; z-index: 4; }
.jump-to-latest:hover { background: #0f6eaf; }
.jump-to-latest.history-jump { background: rgba(255,255,255,.92); border: 1px solid rgba(22,124,194,.18); box-shadow: 0 4px 12px rgba(63,98,122,.14); color: #176da2; }
.jump-to-latest.history-jump:hover { background: #eef8ff; color: #0f6eaf; }
.typing-row { color: #54809d; font-size: 12px; font-style: italic; height: 21px; padding: 5px 4px 0; }
.empty-chat { align-items: center; color: #628099; display: flex; flex-direction: column; gap: 8px; height: 100%; justify-content: center; text-align: center; }
.empty-chat .empty-icon { align-items: center; background: #dcecf7; border-radius: 50%; display: flex; font-size: 31px; height: 70px; justify-content: center; width: 70px; }
.empty-chat strong { color: #294d6b; }
.composer-area { background: rgba(255,255,255,.9); border-top: 1px solid #dfe8ef; padding: 11px max(18px, 5vw) 15px; }
.composer-shell { margin: auto; max-width: 790px; }
.composer-context { align-items: center; background: #e8f4fb; border-left: 3px solid #3692c8; color: #446a82; display: flex; font-size: 12px; justify-content: space-between; margin: 0 8px; padding: 6px 9px; }
.composer-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-context button, .selected-files button { background: transparent; border: 0; color: #4f7288; font-size: 18px; line-height: 1; }
.selected-files { background: #f2f8fb; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); margin: 0 8px; max-height: 170px; overflow: auto; padding: 7px 8px; }
.selected-file-card { align-items: center; background: white; border: 1px solid #d7e6ef; border-radius: 10px; color: #426279; display: grid; gap: 8px; grid-template-columns: 42px minmax(0, 1fr) 24px; min-width: 0; padding: 5px 6px; }
.selected-file-thumb, .selected-file-icon { align-items: center; background: #d9ecf8; border-radius: 8px; display: inline-flex; height: 42px; justify-content: center; overflow: hidden; width: 42px; }
.selected-file-thumb img { display: block; height: 100%; object-fit: cover; width: 100%; }
.selected-file-icon { color: #2874a0; font-size: 10px; font-weight: 850; letter-spacing: -.02em; }
.selected-file-icon-pdf { background: #ffe4e8; color: #b83d50; }
.selected-file-icon-video { background: #e8e3ff; color: #6250b8; }
.selected-file-icon-audio { background: #e5f6e9; color: #33824d; }
.selected-file-icon-text, .selected-file-icon-document { background: #fff1d7; color: #9b6a15; }
.selected-file-copy { display: grid; min-width: 0; }
.selected-file-copy strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file-copy small { color: #8092a0; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file-kind { font-weight: 800; }
.selected-file-card button { align-items: center; border-radius: 7px; display: inline-flex; height: 24px; justify-content: center; padding: 0; width: 24px; }
.selected-file-card button:hover { background: #e7f1f7; color: #1d6b9a; }
.composer { align-items: end; background: white; border: 1px solid #d9e5ee; border-radius: 16px; display: flex; gap: 9px; margin: auto; max-width: 790px; padding: 7px 8px 7px 14px; }
.composer textarea { background: transparent; border: 0; color: #193651; flex: 1; line-height: 1.35; max-height: 120px; min-height: 29px; outline: 0; padding: 6px 0; resize: none; }
.attach-button { background: transparent; border: 0; color: #5f829a; font-size: 18px; height: 34px; padding: 0 2px; transform: rotate(-45deg); }
.attach-button:hover { color: #1878b7; }
.send-button { align-items: center; background: #177abd; border: 0; border-radius: 11px; color: white; display: inline-flex; font-size: 16px; height: 34px; justify-content: center; width: 38px; }
.send-button:hover { background: #0f6cad; }
.read-only { color: #698397; font-size: 13px; margin: auto; max-width: 790px; padding: 8px 4px; text-align: center; }

.modal-backdrop { align-items: center; background: rgba(12,31,54,.45); display: flex; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 20; }
.modal { background: white; border-radius: 17px; box-shadow: 0 25px 70px rgba(5,20,38,.32); max-height: calc(100vh - 36px); overflow: auto; padding: 23px; width: min(100%, 470px); }
.modal-header { align-items: start; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 17px; }
.modal h3 { font-size: 20px; letter-spacing: -.03em; margin: 0; }
.modal-close { background: transparent; border: 0; color: #668097; font-size: 25px; line-height: 1; padding: 0 3px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.form-hint { color: #74889a; font-size: 12px; line-height: 1.45; margin: -5px 0 0; }
.message-search-form { display: grid; gap: 15px; }
.message-search-form .modal-actions { margin-top: 0; }
.message-search-results { border-top: 1px solid #e5edf3; display: grid; gap: 7px; margin-top: 18px; max-height: 340px; overflow: auto; padding-top: 14px; }
.message-search-result { background: #f7fbfe; border: 1px solid #dce9f1; border-radius: 10px; color: #28465c; display: grid; gap: 3px; padding: 10px 11px; text-align: left; width: 100%; }
.message-search-result:hover, .message-search-result:focus-visible { background: #e8f5fc; border-color: #8fc7e5; outline: none; }
.message-search-result strong { color: #1d405b; font-size: 13px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.message-search-result > span:last-child { color: #53809c; font-size: 11px; font-weight: 700; margin-top: 2px; }
.message-search-meta { color: #668398; font-size: 11px; }
.message-search-context { color: #3c7ea5; font-size: 11px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { color: #6d8597; font-size: 13px; margin: 3px 0; text-align: center; }
.employee-directory-form { display: grid; gap: 15px; }
.employee-directory-form .modal-actions { margin-top: 0; }
.employee-directory-results { border-top: 1px solid #e5edf3; display: grid; gap: 7px; margin-top: 18px; max-height: 340px; overflow: auto; padding-top: 14px; }
.employee-directory-result { align-items: center; background: #f7fbfe; border: 1px solid #dce9f1; border-radius: 10px; color: #28465c; display: flex; gap: 10px; padding: 10px 11px; text-align: left; width: 100%; }
.employee-directory-result:hover, .employee-directory-result:focus-visible { background: #e8f5fc; border-color: #8fc7e5; outline: none; }
.employee-directory-result:disabled { cursor: wait; opacity: .72; }
.employee-directory-copy { display: grid; gap: 2px; min-width: 0; }
.employee-directory-copy strong { color: #1d405b; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-directory-copy small { color: #668398; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-directory-open { color: #3c7ea5; font-size: 11px; font-weight: 800; margin-left: auto; white-space: nowrap; }
.error-text { color: #b43d4f; }
.conversation-details-dialog { display: grid; gap: 17px; }
.details-summary, .details-community { border: 1px solid #e1e9f1; border-radius: 12px; padding: 13px 14px; }
.details-summary { background: #f8fbfe; display: grid; gap: 5px; }
.details-summary strong { color: #183b59; font-size: 15px; }
.details-summary p { color: #61798e; font-size: 13px; line-height: 1.45; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.conversation-info-actions { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.conversation-info-actions button { align-items: center; background: #f7fbfe; border: 1px solid #dce9f1; border-radius: 12px; color: #28465c; display: grid; gap: 2px 9px; grid-template-columns: 34px minmax(0, 1fr); min-height: 62px; padding: 10px; text-align: left; transition: background-color var(--opk-motion-fast) linear, border-color var(--opk-motion-fast) linear, transform var(--opk-motion-fast) var(--opk-ease-out); }
.conversation-info-actions button:hover, .conversation-info-actions button:focus-visible { background: #e8f5fc; border-color: #8fc7e5; outline: none; transform: translateY(-1px); }
.conversation-info-actions button > span:first-child { align-items: center; background: #e7f2ff; border-radius: 10px; color: #1764a3; display: inline-flex; grid-row: span 2; height: 34px; justify-content: center; width: 34px; }
.conversation-info-actions button > span:first-child .ui-icon { height: 18px; width: 18px; }
.conversation-info-actions strong { color: #183b59; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-info-actions small { color: #668398; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details-kind, .details-section-head { color: #5e819d; font-size: 11px; font-weight: 780; letter-spacing: .055em; text-transform: uppercase; }
.details-community { display: grid; gap: 14px; }
.details-section-head { align-items: center; display: flex; justify-content: space-between; }
.details-section-head small { color: #71899d; font-size: 11px; font-weight: 650; letter-spacing: normal; text-transform: none; }
.details-editor { gap: 12px; }
.details-actions { margin-top: 0; }
.member-list { border: 1px solid #e1e9f1; border-radius: 12px; list-style: none; margin: 0; max-height: 255px; overflow: auto; padding: 0; }
.member-row { align-items: center; border-bottom: 1px solid #edf2f6; display: flex; gap: 10px; min-height: 58px; padding: 9px 11px; }
.member-row:last-child { border-bottom: 0; }
.member-avatar { flex: 0 0 auto; height: 34px; width: 34px; }
.member-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.member-copy strong { color: #18324d; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-copy small { color: #71879a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-remove { color: #bd3048; flex: 0 0 auto; font-size: 12px; padding: 7px 8px; }
.member-remove:hover { background: #fff0f2; }
.member-actions { align-items: center; display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.member-role { color: #236eaa; flex: 0 0 auto; font-size: 12px; padding: 7px 8px; }
.member-role:hover { background: #edf8ff; }
.member-transfer { color: #6b4a9c; flex: 0 0 auto; font-size: 12px; padding: 7px 8px; }
.member-transfer:hover { background: #f3effb; }

.call-overlay { align-items: center; background: rgba(3,18,37,.87); color: white; display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 30; }
.call-card { align-items: center; display: flex; flex-direction: column; max-width: 720px; text-align: center; width: 100%; }
.call-card h2 { font-size: 24px; letter-spacing: -.03em; margin: 19px 0 5px; }
.call-status { color: #b7cee2; font-size: 14px; margin: 0 0 22px; }
.call-videos { background: #102944; border: 1px solid #2e4c6a; border-radius: 19px; min-height: min(48vw, 360px); overflow: hidden; position: relative; width: min(100%, 640px); }
.call-videos video { background: #081827; display: block; height: auto; min-height: min(48vw, 360px); object-fit: cover; width: 100%; }
.call-videos .local-video { border: 2px solid #8ecef6; border-radius: 12px; bottom: 13px; height: 104px; min-height: 0; position: absolute; right: 13px; width: 142px; }
.call-videos .local-media-unavailable { align-items: center; background: #19344c; color: #b7cee2; display: flex; font-size: 12px; justify-content: center; }
.audio-call-visual { align-items: center; background: radial-gradient(circle, #2774a7, #0c2745 66%); display: flex; flex-direction: column; gap: 12px; height: 250px; justify-content: center; }
.audio-call-visual .avatar { background: #cceaff; color: #235780; font-size: 27px; height: 85px; width: 85px; }
.call-receive-only-note { color: #9fd6ba; font-size: 12px; margin: -14px 0 16px; }
.group-preview-note { color: #8ecef6; font-size: 12px; line-height: 1.45; margin: -12px 0 16px; max-width: 500px; }
.group-sfu-note { color: #9fd6ba; font-size: 12px; line-height: 1.45; margin: -12px 0 16px; max-width: 540px; }
.group-call-videos { min-height: min(54vw, 410px); }
.livekit-call-videos { border-color: #356a61; }
.group-video-grid { display: grid; gap: 1px; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: min(54vw, 410px); }
.group-video-tile { align-items: flex-end; background: #081827; display: flex; min-height: min(27vw, 205px); overflow: hidden; position: relative; }
.group-video-tile video { inset: 0; min-height: 0; position: absolute; }
.group-video-tile span { background: rgba(4, 18, 33, .74); border-radius: 7px; bottom: 10px; font-size: 12px; left: 10px; padding: 5px 8px; position: relative; }
.group-video-tile.local { border: 2px solid #8ecef6; }
.group-video-waiting { align-items: center; color: #b7cee2; display: flex; font-size: 14px; grid-column: 1 / -1; justify-content: center; min-height: min(27vw, 205px); padding: 24px; }
.group-audio-call { align-items: stretch; display: grid; gap: 1px; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 245px; padding: 1px; }
.group-audio-person, .group-audio-waiting { align-items: center; background: radial-gradient(circle at 50% 40%, #2774a7, #0c2745 70%); display: flex; flex-direction: column; gap: 8px; justify-content: center; min-height: 240px; padding: 18px 10px; }
.group-audio-person.local { background: radial-gradient(circle at 50% 40%, #336e93, #0c2745 70%); }
.group-audio-person .avatar { background: #cceaff; color: #235780; font-size: 23px; height: 66px; width: 66px; }
.group-audio-person strong { font-size: 14px; }
.group-audio-person small, .group-audio-waiting { color: #b7cee2; font-size: 12px; }
.group-audio-waiting { grid-column: span 2; }
.call-actions { display: flex; gap: 13px; justify-content: center; margin-top: 22px; }
.round-call-button { align-items: center; background: #284b6c; border: 0; border-radius: 50%; color: white; display: inline-flex; font-size: 19px; height: 51px; justify-content: center; width: 51px; }
.round-call-button:hover { background: #376a91; }
.round-call-button.muted { background: #59697a; color: #d7e1e9; }
.round-call-button.muted:hover { background: #6c7e90; }
.round-call-button.end { background: #d84959; }
.round-call-button.end:hover { background: #bd3345; }
.round-call-button:disabled { cursor: not-allowed; opacity: .48; }
.round-call-button:disabled:hover { background: #284b6c; }
.round-call-button.end:disabled:hover { background: #d84959; }
.incoming-actions { display: flex; gap: 18px; margin-top: 24px; }
.incoming-actions .round-call-button { height: 58px; width: 58px; }
.incoming-actions .accept { background: #31a574; }
.incoming-actions .accept:hover { background: #228b60; }

#toast-root { bottom: 20px; display: grid; gap: 8px; left: 50%; pointer-events: none; position: fixed; transform: translateX(-50%); z-index: 50; }
.toast { background: #173855; border-radius: 10px; box-shadow: 0 10px 24px rgba(13,31,47,.25); color: white; font-size: 13px; max-width: min(88vw, 460px); padding: 11px 14px; }
.toast.error { background: #a93949; }

@media (max-width: 720px) {
  .auth-page { padding: 16px; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-intro { padding: 28px; }
  .auth-intro h1 { margin-top: 28px; }
  .auth-form-area { padding: 28px; }
  .messenger { grid-template-columns: 85px minmax(0, 1fr); }
  .sidebar-head { padding: 15px 9px; }
  .profile-button { justify-content: center; max-width: 100%; }
  .profile-button > span:not(.avatar), .search-box, .chat-section-title, .community-label, .conversation-copy { display: none; }
  .sidebar-actions { display: grid; gap: 7px; margin-top: 12px; }
  .new-button, .global-search-button, .saved-messages-button, .employee-directory-button { margin-top: 0; width: 100%; }
  .sidebar-top { display: block; }
  .conversation-item { justify-content: center; padding: 10px 4px; }
  .conversation-icon, .conversation-item .avatar { height: 39px; width: 39px; }
  .conversation-unread { margin-left: -12px; margin-top: -22px; min-width: 17px; padding: 2px 4px; }
  .conversation-mention-badge { margin-left: -12px; margin-top: 20px; min-width: 18px; padding: 0 4px; }
  .sidebar-scroll { padding: 8px; }
  .room-header { padding: 11px 13px; }
  .pinned-message { padding: 8px 13px; }
  .room-tools { gap: 4px; }
  .messages { padding: 15px 12px; }
  .composer-area { padding: 9px 12px 11px; }
  .group-audio-call { grid-template-columns: 1fr; }
  .group-audio-waiting { grid-column: auto; }
  .group-audio-person, .group-audio-waiting { min-height: 96px; }
  .group-video-grid { min-height: min(95vw, 410px); }
  .group-video-tile { min-height: min(47vw, 205px); }
}

@media (max-width: 460px) {
  .messenger { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .message-bubble { max-width: 86vw; }
}

/*
 * Conversation-focused desktop surface
 *
 * The visual grammar is intentionally familiar—dense conversation list,
 * quiet canvas, clear incoming/outgoing bubbles and an unobtrusive composer—
 * while all product names, icons and assets remain OПК's own.
 */
:root {
  color-scheme: dark;
  --opk-sidebar: #17212b;
  --opk-sidebar-raised: #202b36;
  --opk-canvas: #0e1621;
  --opk-incoming: #182533;
  --opk-outgoing: #2b5278;
  --opk-text: #e7edf3;
  --opk-muted: #89a0b4;
  --opk-blue: #4c9de0;
  --opk-line: rgba(165, 192, 214, .13);
}

body { background: var(--opk-canvas); color: var(--opk-text); }
.messenger { background: var(--opk-canvas); }
.sidebar { background: var(--opk-sidebar); border-right-color: var(--opk-line); }
.sidebar-head { border-bottom-color: var(--opk-line); padding: 14px 15px 11px; }
.profile-button { color: var(--opk-text); }
.profile-status { color: #69c38d; }
.avatar { background: linear-gradient(145deg, #547da5, #2c537b); color: #eff6fd; }
.avatar.large { background: linear-gradient(145deg, #6689b0, #365d85); }
.sidebar-actions { gap: 6px; }
.global-search-button,
.saved-messages-button,
.employee-directory-button,
.new-button {
  border-radius: 50%;
  height: 34px;
  width: 34px;
}
.global-search-button,
.saved-messages-button,
.employee-directory-button {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  color: #b7ccdd;
}
.global-search-button:hover,
.saved-messages-button:hover,
.employee-directory-button:hover { background: rgba(76,157,224,.18); color: #ecf7ff; }
.new-button { background: #3c85c6; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.new-button:hover { background: #4c9de0; }
.search-box {
  background: #202b36;
  border-radius: 8px;
  color: #7894ab;
  margin-top: 12px;
  padding: 8px 10px;
}
.search-box input { color: var(--opk-text); }
.search-box input::placeholder,
.composer textarea::placeholder { color: #7d93a5; }
.sidebar-scroll { padding: 7px 7px 15px; }
.chat-section-title { color: #6f8aa1; font-size: 10px; margin: 13px 9px 5px; }
.conversation-item { border-radius: 8px; color: #dce7f0; gap: 10px; padding: 8px 9px; }
.conversation-item:hover { background: rgba(255,255,255,.055); }
.conversation-item.active { background: #2b5278; color: #fff; }
.conversation-icon { background: #2b3d4e; border-radius: 50%; color: #afcce4; height: 38px; width: 38px; }
.conversation-item.channel .conversation-icon { background: #313c67; color: #b9c8ff; }
.conversation-name { color: inherit; font-size: 13px; font-weight: 720; }
.conversation-time { color: #8399ac; font-size: 10px; }
.conversation-preview { color: #8ca1b3; font-size: 11px; }
.conversation-draft-label { color: #ff9c8b; }
.conversation-item.active .conversation-preview,
.conversation-item.active .conversation-time { color: rgba(255,255,255,.72); }
.conversation-unread { background: #4c8fc8; box-shadow: none; }
.conversation-mention-badge { background: rgba(76,157,224,.18); border-color: rgba(105,188,243,.45); color: #90d2ff; }
.conversation-item.active .conversation-unread { background: rgba(255,255,255,.92); box-shadow: none; color: #285577; }
.conversation-item.active .conversation-mention-badge { background: rgba(255,255,255,.92); border-color: rgba(255,255,255,.7); box-shadow: none; color: #285577; }
.community-label { color: #87a3b8; }
.community-label::before { background: #4c9de0; }

.room-header { background: var(--opk-sidebar); border-bottom-color: var(--opk-line); min-height: 61px; padding: 11px 21px; }
.room-title { color: var(--opk-text); font-size: 14px; }
.room-subtitle { color: #849caf; font-size: 11px; }
.direct-presence,
.direct-presence-unknown,
.direct-presence-username { align-items: center; display: inline-flex; }
.direct-presence { gap: 5px; font-weight: 650; }
.direct-presence.online { color: #79d6a4; }
.direct-presence.offline { color: #8ea5b7; }
.direct-presence-unknown { color: #849caf; }
.direct-presence-dot { background: currentColor; border-radius: 50%; box-shadow: 0 0 0 2px rgba(121,214,164,.08); height: 6px; width: 6px; }
.direct-presence-username::before { color: #6f879a; content: "·"; margin: 0 5px; }
.room-tools { gap: 4px; }
.icon-button { background: transparent; color: #aabed0; height: 33px; min-width: 33px; }
.icon-button:hover { background: rgba(255,255,255,.07); color: #f2f8fd; }
.icon-button.leave-conversation { background: transparent; color: #d797a0; }
.icon-button.leave-conversation:hover { background: rgba(216,73,89,.13); color: #ffc1ca; }
.pinned-message { background: #1b2935; border-bottom-color: var(--opk-line); color: #d5e4ef; padding: 7px 21px; }
.pinned-message-icon { background: rgba(76,157,224,.16); color: #80c3f8; }
.pinned-message-label { color: #75bdf4; }
.pinned-message-copy strong { color: #eff7fd; }
.pinned-message-copy > span:last-child,
.pinned-message-unpin { color: #9db4c6; }
.pinned-message-unpin:hover { background: rgba(255,255,255,.07); color: #fff; }

.messages {
  background-color: var(--opk-canvas);
  background-image:
    radial-gradient(circle at 7px 7px, rgba(165, 202, 230, .075) 1.15px, transparent 1.65px),
    radial-gradient(circle at 21px 21px, rgba(103, 190, 158, .045) 1px, transparent 1.5px),
    linear-gradient(135deg, rgba(78, 114, 143, .08), transparent 38%, rgba(17, 31, 44, .2));
  background-size: 28px 28px, 28px 28px, 100% 100%;
  padding: 19px max(24px, 8vw);
}
.message-day {
  background: rgba(20, 34, 47, .82);
  border: 1px solid rgba(172, 197, 216, .12);
  border-radius: 999px;
  color: #b9cadd;
  display: table;
  font-size: 10px;
  letter-spacing: .02em;
  margin: 2px auto 15px;
  padding: 4px 9px;
}
.unread-separator { color: #82caf6; }
.unread-separator::before,
.unread-separator::after { background: rgba(116, 195, 248, .22); }
.unread-separator span { background: rgba(33, 51, 66, .94); border-color: rgba(116, 195, 248, .2); }
.message-row { gap: 7px; margin: 3px 0; max-width: 760px; }
.composer-drop-overlay { background: rgba(68, 143, 199, .16); border-color: rgba(100, 182, 234, .54); color: #ccecff; }
.composer-drop-overlay > div { background: rgba(27, 41, 54, .94); border-color: rgba(154, 201, 234, .18); box-shadow: 0 14px 38px rgba(0,0,0,.32); }
.composer-drop-overlay span { color: #a9c4d8; }
.message-wrap { max-width: min(590px, 76vw); }
.message-avatar { background: #365d85; color: #eff6fd; height: 28px; width: 28px; }
.message-avatar:hover { background: #456f9b; color: #fff; }
.message-bubble {
  background: color-mix(in srgb, var(--opk-incoming) 94%, #ffffff 6%);
  border: 1px solid rgba(170, 196, 218, .095);
  border-radius: 4px 13px 13px 13px;
  box-shadow: 0 1px 1px rgba(0,0,0,.18), 0 9px 22px rgba(0,0,0,.075);
  padding: 7px 10px 5px;
}
.mine .message-bubble {
  background: linear-gradient(135deg, color-mix(in srgb, var(--opk-outgoing) 94%, #74c3f8 6%), var(--opk-outgoing));
  border-color: rgba(156, 206, 246, .11);
  border-radius: 13px 4px 13px 13px;
}
.message-bubble.deleted { background: rgba(38, 53, 66, .88); border-color: rgba(190,205,216,.1); color: #a6b4c0; }
.message-sender { color: #6ec3fb; }
.message-sender:hover { color: #a8dcff; }
.room-identity-button:hover .room-title { color: #9bd5fb; }
.employee-profile-head strong { color: #eef7ff; }
.employee-profile-head span:last-child { color: #a6bbcb; }
.employee-profile-details li { background: rgba(255,255,255,.055); border-color: rgba(173,203,225,.12); }
.employee-profile-details span { color: #9fb7c8; }
.employee-profile-details strong { color: #e5f1fa; }
.message-body { color: #edf4f9; font-size: 13px; line-height: 1.43; }
.message-mention { background: rgba(76,157,224,.18); color: #8bd2ff; }
.message-mention:hover, .message-mention:focus-visible { background: rgba(76,157,224,.3); color: #d7f0ff; }
.message-link { color: #8bd2ff; }
.message-link:hover, .message-link:focus-visible { color: #ccecff; }
.message-meta { color: #a7bbca; font-size: 10px; }
.message-read-status { color: #b5c7d4; }
.message-read-status.peer-read { color: #74c3f8; }
.forwarded-message { color: #9bcdf0; }
.forwarded-message > span:first-child,
.forwarded-message strong { color: #79c3f2; }
.reply-quote { background: rgba(124, 195, 240, .09); border-left-color: #64b6ea; color: #b6d3e5; }
.reply-quote strong { color: #7bc4ef; }
.attachment { background: rgba(255,255,255,.055); border-color: rgba(173,203,225,.12); color: #d6e9f7; }
.attachment:hover { background: rgba(255,255,255,.1); }
.attachment > span:first-child { background: rgba(108, 180, 229, .17); }
.attachment small { color: #a4bbcc; }
.reaction { background: rgba(14,22,33,.62); border-color: rgba(182,205,223,.14); color: #c8d9e6; }
.reaction:hover, .reaction.mine { background: rgba(76,157,224,.18); border-color: rgba(102,184,239,.42); }
.message-tools { right: -3px; top: -27px; }
.message-tools button { background: #263747; border-color: rgba(191,216,236,.14); color: #c7d9e8; }
.message-tools button:hover { background: #34526b; color: #fff; }
.message-tools button.saved { background: rgba(76,157,224,.2); border-color: rgba(104,188,244,.5); color: #90d2ff; }
.message-poll-card { background: rgba(28, 43, 56, .86); border-color: rgba(156, 201, 232, .18); }
.message-poll-head { color: #eef7ff; }
.message-poll-head .ui-icon { color: #84caff; }
.poll-option { background: rgba(255,255,255,.045); border-color: rgba(188, 216, 236, .14); color: #dbeaf4; }
.poll-option:hover, .poll-option:focus-visible { background: rgba(76,157,224,.14); border-color: rgba(105,188,243,.5); }
.poll-option.selected { background: rgba(76,157,224,.22); border-color: rgba(127, 207, 255, .56); color: #eff9ff; }
.poll-option-main span { color: #91cef4; }
.poll-option-bar { background: rgba(137, 178, 207, .18); }
.poll-option small, .poll-summary { color: #9fb6c7; }
.reaction-picker { background: #263747; border-color: rgba(191,216,236,.14); box-shadow: 0 8px 22px rgba(0,0,0,.32); }
.reaction-picker button:hover { background: rgba(255,255,255,.1); }
.message-context-menu { background: #243443; border-color: rgba(188, 215, 235, .14); box-shadow: 0 17px 44px rgba(0,0,0,.36); }
.message-context-menu button { color: #d4e3ef; }
.message-context-menu button:hover { background: rgba(99, 166, 217, .16); color: #fff; }
.message-context-menu button.danger { color: #ffadba; }
.message-context-menu button.danger:hover { background: rgba(219, 73, 94, .18); color: #ffd8de; }
.load-history { background: rgba(36, 67, 93, .92); color: #d8edf9; }
.load-history:hover { background: #315c7e; }
.jump-to-latest { background: #3b84c4; box-shadow: 0 5px 14px rgba(0,0,0,.28); }
.jump-to-latest:hover { background: #4c9de0; }
.jump-to-latest.history-jump { background: rgba(26,40,52,.92); border-color: rgba(105,188,243,.22); box-shadow: 0 5px 14px rgba(0,0,0,.24); color: #a8daf9; }
.jump-to-latest.history-jump:hover { background: rgba(34,54,70,.96); color: #d6f0ff; }
.typing-row { color: #91b8d3; }
.empty-chat { color: #a9bdcd; }
.empty-chat .empty-icon { background: rgba(73, 128, 166, .25); color: #c6e1f4; }
.empty-chat strong { color: #e4eff7; }

.composer-area { background: var(--opk-sidebar); border-top-color: var(--opk-line); padding: 10px max(18px, 8vw) 13px; }
.composer-shell { max-width: 780px; }
.composer-context { background: rgba(69, 128, 168, .17); border-left-color: #59a9df; color: #c5dae9; margin: 0 5px; }
.composer-context button,
.selected-files button { color: #b4cadb; }
.selected-files { background: rgba(255,255,255,.045); margin: 0 5px; }
.selected-file-card { background: #263747; border-color: rgba(184,211,231,.13); color: #d6e6f2; }
.selected-file-thumb,
.selected-file-icon { background: rgba(108, 180, 229, .17); color: #d8edf9; }
.selected-file-icon-pdf { background: rgba(226, 86, 104, .18); color: #ffb4c0; }
.selected-file-icon-video { background: rgba(139, 118, 238, .18); color: #c8befd; }
.selected-file-icon-audio { background: rgba(84, 183, 111, .16); color: #b6efc8; }
.selected-file-icon-text,
.selected-file-icon-document { background: rgba(231, 171, 73, .16); color: #ffd99b; }
.selected-file-copy small { color: #a8bece; }
.selected-file-card button:hover { background: rgba(255,255,255,.09); color: #fff; }
.composer {
  background: #202d3a;
  border-color: rgba(177, 205, 227, .14);
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 2px 5px rgba(0,0,0,.12);
  gap: 5px;
  max-width: 780px;
  padding: 6px 7px 6px 9px;
  position: relative;
}
.composer textarea { color: #ecf4fa; font-size: 14px; padding: 6px 2px; }
.attach-button,
.composer-emoji-button,
.composer-poll-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #98afc0;
  display: inline-flex;
  font-size: 19px;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 30px;
}
.attach-button { transform: none; }
.attach-button svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 19px; }
.attach-button:hover,
.composer-emoji-button:hover,
.composer-poll-button:hover { color: #e9f6ff; }
.send-button { background: #3f8bc9; border-radius: 50%; box-shadow: none; height: 34px; width: 34px; }
.send-button:hover { background: #52a1e0; }
.composer-emoji-picker {
  background: #263747;
  border: 1px solid rgba(191,216,236,.16);
  border-radius: 12px;
  bottom: 45px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(4, 1fr);
  left: 37px;
  padding: 6px;
  position: absolute;
  z-index: 7;
}
.composer-emoji-picker button { background: transparent; border: 0; border-radius: 7px; font-size: 19px; height: 31px; width: 31px; }
.composer-emoji-picker button:hover { background: rgba(255,255,255,.1); }
.composer-mention-picker {
  background: #263747;
  border: 1px solid rgba(191,216,236,.16);
  border-radius: 12px;
  bottom: 45px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  display: grid;
  gap: 3px;
  left: 48px;
  min-width: 250px;
  padding: 6px;
  position: absolute;
  z-index: 5;
}
.composer-mention-picker button { align-items: center; background: transparent; border: 0; border-radius: 9px; color: #dceaf5; display: flex; gap: 9px; padding: 7px 8px; text-align: left; }
.composer-mention-picker button:hover, .composer-mention-picker button:focus-visible { background: rgba(76,157,224,.16); outline: none; }
.composer-mention-picker .avatar { height: 30px; width: 30px; }
.composer-mention-picker span:last-child { display: grid; gap: 1px; min-width: 0; }
.composer-mention-picker strong { color: #f0f7fc; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-mention-picker small { color: #94bdd9; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-only { color: #a8bdcc; }

.modal-backdrop { background: rgba(3,10,16,.62); }
.modal { background: #1b2935; box-shadow: 0 25px 70px rgba(0,0,0,.48); color: var(--opk-text); }
.modal h3 { color: #f0f6fb; }
.modal-close { color: #a6bccd; }
.modal-close:hover { color: white; }
.field label { color: #c8d8e4; }
.field input,
.field textarea,
.field select { background: #202e3b; border-color: rgba(187,214,233,.16); color: #edf5fb; }
.field input:focus,
.field textarea:focus,
.field select:focus { background: #263746; border-color: #5aaae0; box-shadow: 0 0 0 3px rgba(76,157,224,.16); }
.form-hint,
.search-empty { color: #9fb4c4; }
.primary-button { background: #3d89c7; box-shadow: none; }
.primary-button:hover { background: #51a0df; }
.secondary-button { background: rgba(76,157,224,.16); color: #bde5ff; }
.quiet-button { color: #b4cadd; }
.quiet-button:hover { background: rgba(255,255,255,.07); }
.message-search-results,
.employee-directory-results { border-top-color: var(--opk-line); }
.message-search-result,
.employee-directory-result { background: #202e3b; border-color: rgba(187,214,233,.13); color: #d9e8f3; }
.message-search-result:hover,
.message-search-result:focus-visible,
.employee-directory-result:hover,
.employee-directory-result:focus-visible { background: #283b4d; border-color: rgba(105,188,243,.48); }
.message-search-result strong,
.employee-directory-copy strong { color: #eff6fb; }
.message-search-result > span:last-child,
.message-search-meta,
.employee-directory-copy small { color: #a8bdcd; }
.message-search-context,
.employee-directory-open { color: #83c6f3; }
.details-summary,
.details-community,
.member-list { background: #202e3b; border-color: rgba(187,214,233,.13); }
.conversation-info-actions button { background: #202e3b; border-color: rgba(187,214,233,.13); color: #d9e8f3; }
.conversation-info-actions button:hover,
.conversation-info-actions button:focus-visible { background: #283b4d; border-color: rgba(105,188,243,.48); }
.conversation-info-actions button > span:first-child { background: rgba(76,157,224,.16); color: #8bcbf5; }
.details-summary strong,
.conversation-info-actions strong,
.member-copy strong { color: #edf5fb; }
.details-summary p,
.conversation-info-actions small,
.member-copy small { color: #a9bfce; }
.member-row { border-bottom-color: rgba(187,214,233,.1); }

@media (max-width: 720px) {
  .messages { padding: 14px 12px; }
  .composer-area { padding: 9px 12px 11px; }
  .room-header { padding: 10px 12px; }
}

/*
 * Motion and interaction polish
 *
 * This layer borrows the useful desktop-messenger principles we observed in
 * Telegram—short, purposeful feedback and a calm conversation canvas—without
 * importing its artwork, names, assets, or brand treatment.  It is kept at
 * the end of the sheet so Windows and macOS use exactly the same interaction
 * timings.
 */
:root {
  --opk-motion-fast: 120ms;
  --opk-motion-base: 180ms;
  --opk-motion-slow: 240ms;
  --opk-ease-out: cubic-bezier(.2, .72, .25, 1);
  --opk-ease-in: cubic-bezier(.45, 0, .7, .2);
}

.ui-icon {
  display: block;
  fill: none;
  height: 18px;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.conversation-icon .ui-icon { height: 19px; width: 19px; }
.search-box .ui-icon { flex: 0 0 auto; height: 16px; width: 16px; }
.message-tools .ui-icon { height: 13px; width: 13px; }
.pinned-message-icon .ui-icon { height: 16px; width: 16px; }
.pinned-message-unpin .ui-icon { height: 17px; width: 17px; }
.composer-context .ui-icon, .selected-files .ui-icon { height: 16px; width: 16px; }
.send-button .ui-icon { height: 18px; margin-left: 1px; width: 18px; }
.round-call-button .ui-icon { height: 20px; width: 20px; }

button,
.conversation-item,
.reaction,
.attachment,
.employee-directory-result,
.message-search-result {
  -webkit-tap-highlight-color: transparent;
}

button:not([disabled]) { transition: transform var(--opk-motion-fast) var(--opk-ease-out), background-color var(--opk-motion-fast) linear, color var(--opk-motion-fast) linear, border-color var(--opk-motion-fast) linear, box-shadow var(--opk-motion-base) var(--opk-ease-out); }
button:not([disabled]):active { transform: scale(.96); }

.global-search-button,
.saved-messages-button,
.employee-directory-button,
.new-button,
.icon-button,
.round-call-button {
  align-items: center;
  justify-content: center;
}

.new-button .ui-icon { height: 17px; width: 17px; }
.icon-button .ui-icon { height: 18px; width: 18px; }
.icon-button-group-call { position: relative; }
.icon-button-group-call > span {
  align-items: center;
  background: var(--opk-blue);
  border: 2px solid var(--opk-sidebar);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 13px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 1px;
  top: 1px;
  width: 13px;
}

.search-box {
  border: 1px solid transparent;
  transition: background-color var(--opk-motion-base) var(--opk-ease-out), border-color var(--opk-motion-base) var(--opk-ease-out), box-shadow var(--opk-motion-base) var(--opk-ease-out);
}
.search-box:focus-within {
  background: #263746;
  border-color: rgba(105,188,243,.58);
  box-shadow: 0 0 0 3px rgba(76,157,224,.13);
}

.sidebar-scroll { scrollbar-color: rgba(143,181,207,.42) transparent; scrollbar-width: thin; }
.sidebar-scroll::-webkit-scrollbar, .messages::-webkit-scrollbar, .modal::-webkit-scrollbar { height: 9px; width: 9px; }
.sidebar-scroll::-webkit-scrollbar-thumb, .messages::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb { background: rgba(137,168,191,.34); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover, .messages::-webkit-scrollbar-thumb:hover, .modal::-webkit-scrollbar-thumb:hover { background-color: rgba(154,190,217,.58); }

.conversation-item {
  min-height: 54px;
  position: relative;
  transition: background-color var(--opk-motion-base) var(--opk-ease-out), color var(--opk-motion-fast) linear, transform var(--opk-motion-fast) var(--opk-ease-out);
}
.conversation-item::before {
  background: rgba(255,255,255,.8);
  border-radius: 999px;
  content: "";
  height: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: height var(--opk-motion-base) var(--opk-ease-out), opacity var(--opk-motion-fast) linear;
  width: 3px;
}
.conversation-item.active::before { height: 26px; opacity: .82; }
@media (hover: hover) {
  .conversation-item:hover { transform: translateX(1px); }
  .message-bubble { transition: border-color var(--opk-motion-base) var(--opk-ease-out), box-shadow var(--opk-motion-base) var(--opk-ease-out); }
  .message-row:hover .message-bubble { border-color: rgba(145,193,229,.19); box-shadow: 0 3px 10px rgba(0,0,0,.14); }
}

.room-enter .room-top { animation: opk-room-header-in var(--opk-motion-base) var(--opk-ease-out) both; }
.room-enter .messages { animation: opk-room-content-in var(--opk-motion-slow) var(--opk-ease-out) both; }
.room-enter .composer-area { animation: opk-room-composer-in var(--opk-motion-base) var(--opk-ease-out) both; }
.message-enter { animation: opk-message-in var(--opk-motion-base) var(--opk-ease-out) both; }

.pinned-message { transition: background-color var(--opk-motion-base) var(--opk-ease-out), border-color var(--opk-motion-base) var(--opk-ease-out); }
.pinned-message:hover { background: #213242; }
.message-tools { transform: translateY(2px); transition: opacity var(--opk-motion-fast) linear, transform var(--opk-motion-fast) var(--opk-ease-out); }
.message-row:hover .message-tools, .message-tools:focus-within { transform: translateY(0); }
.reaction-picker, .composer-emoji-picker, .composer-mention-picker { animation: opk-pop-in var(--opk-motion-base) var(--opk-ease-out) both; transform-origin: bottom left; }
.reaction-picker { transform-origin: top right; }

.typing-row {
  align-items: center;
  display: flex;
  min-height: 21px;
  transition: color var(--opk-motion-fast) linear;
}
.typing-row:not(:empty)::after {
  animation: opk-typing-dots 1.1s steps(4, end) infinite;
  content: "...";
  display: inline-block;
  letter-spacing: 1px;
  margin-left: 3px;
  overflow: hidden;
  width: 0;
}

.composer {
  transition: border-color var(--opk-motion-base) var(--opk-ease-out), box-shadow var(--opk-motion-base) var(--opk-ease-out), background-color var(--opk-motion-base) var(--opk-ease-out), transform var(--opk-motion-fast) var(--opk-ease-out);
}
.composer:focus-within {
  background: #243646;
  border-color: rgba(102,184,239,.56);
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 0 0 3px rgba(76,157,224,.12), 0 5px 18px rgba(0,0,0,.16);
}
.composer-context, .selected-files { animation: opk-composer-context-in var(--opk-motion-base) var(--opk-ease-out) both; }

.modal-backdrop { backdrop-filter: blur(2px); }
.modal-backdrop.motion-enter { animation: opk-backdrop-in var(--opk-motion-base) var(--opk-ease-out) both; }
.modal-backdrop.motion-enter .modal { animation: opk-modal-in var(--opk-motion-slow) var(--opk-ease-out) both; }
.modal-backdrop.is-closing { animation: opk-backdrop-out var(--opk-motion-fast) var(--opk-ease-in) both; pointer-events: none; }
.modal-backdrop.is-closing .modal { animation: opk-modal-out var(--opk-motion-fast) var(--opk-ease-in) both; }
.modal-close .ui-icon { height: 19px; width: 19px; }

.employee-directory-result, .message-search-result { animation: opk-list-item-in var(--opk-motion-base) var(--opk-ease-out) both; }
.employee-directory-result:nth-child(2), .message-search-result:nth-child(2) { animation-delay: 20ms; }
.employee-directory-result:nth-child(3), .message-search-result:nth-child(3) { animation-delay: 40ms; }
.employee-directory-result:nth-child(4), .message-search-result:nth-child(4) { animation-delay: 60ms; }
.employee-directory-result:nth-child(5), .message-search-result:nth-child(5) { animation-delay: 80ms; }

.call-overlay.motion-enter { animation: opk-call-backdrop-in var(--opk-motion-base) var(--opk-ease-out) both; }
.call-overlay.motion-enter .call-card { animation: opk-call-card-in var(--opk-motion-slow) var(--opk-ease-out) both; }
.call-videos, .group-audio-call { box-shadow: 0 16px 42px rgba(0,0,0,.25); }
.round-call-button { transition: transform var(--opk-motion-fast) var(--opk-ease-out), background-color var(--opk-motion-fast) linear, box-shadow var(--opk-motion-base) var(--opk-ease-out); }
.round-call-button.accept { box-shadow: 0 0 0 0 rgba(49,165,116,.52); animation: opk-accept-pulse 2.4s ease-out infinite; }
.round-call-button.end { transform: rotate(135deg); }
.round-call-button.end:active { transform: rotate(135deg) scale(.95); }

.toast { animation: opk-toast-in var(--opk-motion-base) var(--opk-ease-out) both; }
.toast.is-leaving { animation: opk-toast-out var(--opk-motion-fast) var(--opk-ease-in) both; }

@keyframes opk-room-header-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes opk-room-content-in { from { opacity: .15; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes opk-room-composer-in { from { opacity: .15; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes opk-message-in { from { opacity: 0; transform: translateY(7px) scale(.988); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes opk-pop-in { from { opacity: 0; transform: translateY(5px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes opk-composer-context-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes opk-backdrop-in { from { background-color: rgba(3,10,16,0); } to { background-color: rgba(3,10,16,.62); } }
@keyframes opk-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes opk-modal-in { from { opacity: 0; transform: translateY(10px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes opk-modal-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(5px) scale(.98); } }
@keyframes opk-list-item-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }
@keyframes opk-call-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes opk-call-card-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes opk-toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes opk-toast-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(5px) scale(.98); } }
@keyframes opk-typing-dots { 0% { width: 0; } 100% { width: 19px; } }
@keyframes opk-accept-pulse { 0%, 74% { box-shadow: 0 0 0 0 rgba(49,165,116,.48); } 82% { box-shadow: 0 0 0 9px rgba(49,165,116,0); } 100% { box-shadow: 0 0 0 0 rgba(49,165,116,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-delay: 0s !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .conversation-item.active { outline: 2px solid Highlight; outline-offset: -2px; }
  .conversation-item.active::before { display: none; }
  .search-box:focus-within, .composer:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}

/*
 * Address book drawer
 *
 * Chats stay on the left. The address book opens as a middle drawer between
 * the chat list and the active conversation, and stays unmounted visually
 * until the employee asks for it.
 */
.messenger {
  grid-template-columns: minmax(270px, 320px) 0 minmax(0, 1fr);
  transition: grid-template-columns var(--opk-motion-slow) var(--opk-ease-out);
}

.messenger.contacts-open {
  grid-template-columns: minmax(270px, 320px) minmax(270px, 320px) minmax(0, 1fr);
}

.contacts-panel {
  background: var(--opk-sidebar);
  border-left: 0 solid var(--opk-line);
  border-right: 0 solid var(--opk-line);
  display: flex;
  flex-direction: column;
  grid-column: 2;
  min-height: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-14px);
  transition:
    opacity var(--opk-motion-base) var(--opk-ease-out),
    transform var(--opk-motion-slow) var(--opk-ease-out),
    visibility 0s linear var(--opk-motion-slow);
  visibility: hidden;
}

.messenger.contacts-open .contacts-panel {
  border-left-width: 1px;
  border-right-width: 1px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity var(--opk-motion-base) var(--opk-ease-out),
    transform var(--opk-motion-slow) var(--opk-ease-out),
    visibility 0s linear 0s;
  visibility: visible;
}
.contacts-toggle-button.active { background: rgba(76,157,224,.24); color: #ecf7ff; }

.contacts-head {
  border-bottom: 1px solid var(--opk-line);
  padding: 16px 14px 11px;
}

.contacts-title-row {
  align-items: center;
  display: flex;
  gap: 9px;
}

.contacts-title-icon {
  align-items: center;
  background: rgba(76, 157, 224, .16);
  border-radius: 10px;
  color: #8bcbf5;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.contacts-title-icon .ui-icon { height: 18px; width: 18px; }
.contacts-title-row h2 { color: var(--opk-text); font-size: 14px; line-height: 1.15; margin: 0; }
.contacts-title-row p { color: var(--opk-muted); font-size: 11px; margin: 3px 0 0; }

.contacts-panel-close {
  align-items: center;
  background: rgba(255,255,255,.045);
  border: 0;
  border-radius: 8px;
  color: #9eb4c5;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  margin-left: auto;
  width: 30px;
}
.contacts-panel-close:hover { background: rgba(255,255,255,.09); color: #eef7fd; }
.contacts-panel-close .ui-icon { height: 16px; width: 16px; }

.contacts-search-label {
  color: #a9bfd0;
  display: block;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .055em;
  margin: 15px 0 6px;
  text-transform: uppercase;
}

.contacts-search-control {
  align-items: center;
  background: #202b36;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #86a1b6;
  display: flex;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px 7px 10px;
  transition: background-color var(--opk-motion-base) var(--opk-ease-out), border-color var(--opk-motion-base) var(--opk-ease-out), box-shadow var(--opk-motion-base) var(--opk-ease-out);
}

.contacts-search-control:focus-within {
  background: #263746;
  border-color: rgba(105, 188, 243, .58);
  box-shadow: 0 0 0 3px rgba(76, 157, 224, .13);
}

.contacts-search-control > .ui-icon { flex: 0 0 auto; height: 16px; width: 16px; }
.contacts-search-control input { background: transparent; border: 0; color: var(--opk-text); min-width: 0; outline: none; padding: 0; width: 100%; }
.contacts-search-control input::placeholder { color: #7d93a5; }

.contacts-clear {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #96adbe;
  display: inline-flex;
  flex: 0 0 auto;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.contacts-clear:hover { background: rgba(255,255,255,.08); color: #edf6fd; }
.contacts-clear:disabled { cursor: default; opacity: .35; }
.contacts-clear .ui-icon { height: 15px; width: 15px; }
.contacts-search-hint { color: #829aaf; font-size: 11px; line-height: 1.35; margin: 7px 1px 0; }

.contacts-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 7px 15px;
  scrollbar-color: rgba(143,181,207,.42) transparent;
  scrollbar-width: thin;
}

.contacts-results::-webkit-scrollbar { height: 9px; width: 9px; }
.contacts-results::-webkit-scrollbar-thumb { background: rgba(137,168,191,.34); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
.contacts-results::-webkit-scrollbar-thumb:hover { background-color: rgba(154,190,217,.58); }

.contact-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #dce7f0;
  display: flex;
  gap: 9px;
  min-height: 53px;
  padding: 8px 8px;
  position: relative;
  text-align: left;
  width: 100%;
}

.contact-item:hover,
.contact-item:focus-visible { background: rgba(255,255,255,.06); }
.contact-item:disabled { cursor: wait; opacity: .7; }
.contact-item .avatar { height: 34px; width: 34px; }
.contact-copy { display: grid; gap: 2px; min-width: 0; }
.contact-name { color: #edf6fc; font-size: 13px; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-role { color: #8fc6e9; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-username { color: #91a8ba; }
.contact-open { color: #80c3f0; display: inline-flex; margin-left: auto; opacity: 0; transition: opacity var(--opk-motion-fast) linear; }
.contact-open .ui-icon { height: 16px; width: 16px; }
.contact-item:hover .contact-open, .contact-item:focus-visible .contact-open { opacity: 1; }
.contacts-empty { color: #9fb4c4; font-size: 12px; line-height: 1.45; margin: 16px 9px; text-align: center; }
.contacts-error { color: #f2aab3; }

@media (max-width: 1180px) {
  .messenger,
  .messenger.contacts-open { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .contacts-panel {
    bottom: 0;
    box-shadow: 18px 0 42px rgba(0,0,0,.28);
    left: clamp(220px, 27vw, 280px);
    position: absolute;
    right: auto;
    top: 0;
    transform: translateX(-18px);
    width: min(340px, calc(100vw - 220px));
    z-index: 15;
  }
  .messenger.contacts-open .contacts-panel { transform: translateX(0); }
}

@media (max-width: 720px) {
  .messenger,
  .messenger.contacts-open { grid-template-columns: 74px minmax(0, 1fr); height: 100dvh; }
  .sidebar { display: flex; }
  .contacts-panel { left: 74px; width: min(330px, calc(100vw - 74px)); }
  .contacts-head { padding: 10px 11px 8px; }
  .contacts-results { padding: 6px 7px 11px; }
  .contact-item { min-height: 48px; padding: 7px; }
  .contact-item .avatar { height: 31px; width: 31px; }
}

@media (max-width: 520px) {
  .contact-open { opacity: 1; }
  .conversation-info-actions { grid-template-columns: 1fr; }
}

/* Signature-validated raster attachments receive a calm, content-first
 * treatment. The server preserves the existing membership check for every
 * preview request; these styles only reserve stable space and keep scroll
 * performance predictable as a photo decodes. */
.message-image-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 7px;
  max-width: min(440px, 100%);
}

.message-image-grid.single { grid-template-columns: minmax(0, 1fr); max-width: min(420px, 100%); }
.message-image-grid.album {
  border-radius: 11px;
  grid-auto-flow: dense;
  grid-auto-rows: minmax(112px, 1fr);
  max-width: min(452px, 100%);
  overflow: hidden;
}
.message-image-grid.album .message-image-card { border-radius: 0; min-height: 112px; }
.message-image-grid.count-2 .message-image-card img { aspect-ratio: 1 / 1; }
.message-image-grid.count-3 .message-image-card:first-child { grid-column: 1 / -1; }
.message-image-grid.count-3 .message-image-card:first-child img { aspect-ratio: 16 / 9; max-height: 240px; }
.message-image-grid.count-4 { grid-template-rows: repeat(2, minmax(112px, 1fr)); }
.message-image-grid.count-5 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.message-image-grid.count-5 .message-image-card { grid-column: span 3; }
.message-image-grid.count-5 .message-image-card:nth-child(n+3) { grid-column: span 2; }

.message-image-card {
  appearance: none;
  background: #17232e;
  border: 1px solid rgba(181, 213, 236, .15);
  border-radius: 9px;
  cursor: zoom-in;
  display: block;
  min-height: 116px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.message-image-card::after {
  background: linear-gradient(135deg, rgba(255,255,255,.1), transparent 45%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity var(--opk-motion-fast) var(--opk-ease-out);
}

.message-image-card:hover::after,
.message-image-card:focus-visible::after { opacity: 1; }

.message-image-card:focus-visible { outline: 2px solid #81c9f5; outline-offset: 2px; }

.message-image-card img {
  aspect-ratio: 4 / 3;
  content-visibility: auto;
  display: block;
  height: 100%;
  max-height: 350px;
  object-fit: cover;
  width: 100%;
}

.message-image-grid.single .message-image-card img { aspect-ratio: auto; max-height: 420px; min-height: 136px; object-fit: contain; }
.mine .message-image-card { border-color: rgba(127, 211, 169, .22); }
.attachment > span:first-child .ui-icon { height: 16px; width: 16px; }

.media-attachment-list {
  display: grid;
  gap: 7px;
  margin-top: 7px;
  max-width: min(430px, 100%);
}

.message-document-card,
.message-audio-card,
.message-video-card {
  background: #17232e;
  border: 1px solid rgba(181, 213, 236, .15);
  border-radius: 10px;
  color: #dce9f3;
  overflow: hidden;
}

.message-document-card,
.message-audio-card {
  align-items: center;
  display: flex;
  gap: 11px;
  min-height: 58px;
  padding: 10px 11px;
}

.message-document-card {
  appearance: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.message-download-card {
  cursor: default;
  text-decoration: none;
}

.message-document-card:hover,
.message-document-card:focus-visible,
.message-video-card:hover,
.message-video-card:focus-visible { border-color: rgba(119,194,239,.55); outline: none; }

.media-card-icon {
  align-items: center;
  background: rgba(77,154,211,.16);
  border-radius: 10px;
  color: #9ed8fb;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.media-card-icon .ui-icon { height: 20px; width: 20px; }
.media-card-icon.large { height: 54px; width: 54px; }
.media-card-icon.large .ui-icon { height: 28px; width: 28px; }

.media-card-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
}

.media-card-copy strong,
.message-video-title {
  color: #eff7fd;
  font-size: 13px;
  font-weight: 730;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card-copy small { color: #9bb2c3; font-size: 11px; }
.media-card-open,
.media-card-download {
  align-items: center;
  background: transparent;
  border: 0;
  color: #88cdf6;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  padding: 0;
}

.media-card-open { cursor: pointer; }
.media-card-open:hover, .media-card-open:focus-visible,
.media-card-download:hover, .media-card-download:focus-visible { color: #d9f2ff; outline: none; }

.media-card-open .ui-icon,
.media-card-download .ui-icon { height: 18px; width: 18px; }

.message-audio-card audio {
  height: 32px;
  max-width: 100%;
  width: min(300px, 100%);
}

.message-video-card {
  appearance: none;
  cursor: pointer;
  display: grid;
  padding: 0;
  position: relative;
  text-align: left;
  width: 100%;
}

.message-video-card video {
  aspect-ratio: 16 / 9;
  background: #0f1720;
  display: block;
  object-fit: cover;
  width: 100%;
}

.message-video-play {
  align-items: center;
  background: rgba(12,24,34,.72);
  border: 1px solid rgba(220,238,248,.28);
  border-radius: 999px;
  color: #ecf8ff;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
}

.message-video-play .ui-icon { height: 22px; width: 22px; }
.message-video-title { background: linear-gradient(transparent, rgba(11,20,29,.78)); bottom: 0; left: 0; padding: 22px 10px 9px; position: absolute; right: 0; }

.image-preview-modal { display: grid; gap: 12px; max-width: min(880px, 88vw); }
.image-preview-canvas, .media-preview-canvas { align-items: center; background: #111c25; border: 1px solid rgba(180,210,232,.13); border-radius: 12px; display: flex; justify-content: center; max-height: min(70vh, 680px); min-height: 160px; overflow: hidden; }
.image-preview-canvas img { display: block; max-height: min(70vh, 680px); max-width: 100%; object-fit: contain; }
.document-preview-canvas { height: min(72vh, 760px); width: min(820px, 86vw); }
.document-preview-frame { background: #fff; border: 0; height: 100%; width: 100%; }
.video-preview-canvas video { display: block; max-height: min(70vh, 680px); max-width: 100%; }
.audio-preview-canvas { flex-direction: column; gap: 18px; min-width: min(420px, 80vw); padding: 28px; }
.audio-preview-canvas audio { width: min(360px, 100%); }
.media-preview-nav { align-items: center; display: flex; gap: 10px; justify-content: center; }
.media-preview-nav span { color: var(--opk-muted); font-size: 12px; font-weight: 760; min-width: 54px; text-align: center; }
.media-preview-nav-button { align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(180,210,232,.16); border-radius: 999px; color: #d8eefc; display: inline-flex; height: 34px; justify-content: center; width: 34px; }
.media-preview-nav-button:hover, .media-preview-nav-button:focus-visible { background: rgba(76,157,224,.28); border-color: rgba(123,197,242,.52); color: #fff; outline: none; }
.media-preview-nav-button .ui-icon { height: 19px; width: 19px; }
.image-preview-footer { align-items: center; color: var(--opk-muted); display: flex; font-size: 12px; gap: 12px; justify-content: space-between; min-width: 0; }
.image-preview-footer > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-download { align-items: center; display: inline-flex; flex: 0 0 auto; gap: 6px; text-decoration: none; }
.image-preview-download .ui-icon { height: 16px; width: 16px; }

.attachment-gallery-modal { width: min(100%, 780px); }
.attachment-gallery-dialog { display: grid; gap: 13px; min-height: 180px; }
.attachment-gallery-tabs {
  background: rgba(18,31,42,.72);
  border: 1px solid rgba(181,213,236,.12);
  border-radius: 11px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
}

.attachment-gallery-tabs button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #9db6c8;
  font-size: 12px;
  font-weight: 720;
  min-height: 34px;
}

.attachment-gallery-tabs button.active {
  background: #263c4e;
  color: #eff8ff;
}

.attachment-gallery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: min(60vh, 560px);
  overflow: auto;
  padding: 1px;
}

.attachment-gallery-item {
  background: #17232e;
  border: 1px solid rgba(181,213,236,.14);
  border-radius: 10px;
  color: #dce9f3;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
}

.attachment-gallery-photo,
.attachment-gallery-video {
  appearance: none;
  cursor: pointer;
  display: grid;
  padding: 0;
  position: relative;
  text-align: left;
}

.attachment-gallery-photo img,
.attachment-gallery-video video {
  aspect-ratio: 1 / 1;
  background: #0f1720;
  display: block;
  object-fit: cover;
  width: 100%;
}

.attachment-gallery-photo span,
.attachment-gallery-video > span:last-child {
  background: linear-gradient(transparent, rgba(11,20,29,.86));
  bottom: 0;
  color: #eef7fd;
  font-size: 11px;
  font-weight: 720;
  left: 0;
  overflow: hidden;
  padding: 22px 8px 8px;
  position: absolute;
  right: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-gallery-file {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 66px;
  padding: 10px;
}

.attachment-gallery-item:hover,
.attachment-gallery-item:focus-visible {
  border-color: rgba(119,194,239,.55);
  outline: none;
}

.attachment-gallery-empty {
  align-items: center;
  border: 1px dashed rgba(181,213,236,.16);
  border-radius: 12px;
  color: #9fb4c4;
  display: flex;
  justify-content: center;
  min-height: 138px;
  text-align: center;
}

@media (max-width: 720px) {
  .message-image-grid { max-width: min(100%, 420px); }
  .message-image-card { min-height: 96px; }
  .image-preview-modal { max-width: calc(100vw - 34px); }
  .document-preview-canvas { height: 70vh; width: calc(100vw - 48px); }
  .attachment-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attachment-gallery-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-preview-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Profile settings and the birthday calendar use the existing dark desktop
 * visual language, while keeping a clear separation between a person's
 * editable data and the company-wide, year-free birthday view. */
.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.birthday-quick-card {
  align-items: center;
  background: linear-gradient(135deg, rgba(76,157,224,.17), rgba(89,198,166,.10));
  border: 1px solid rgba(120,190,230,.22);
  border-radius: 10px;
  color: var(--opk-text);
  display: flex;
  gap: 9px;
  margin-top: 14px;
  min-height: 58px;
  padding: 8px 9px;
  text-align: left;
  transition: background-color var(--opk-motion-base) var(--opk-ease-out), border-color var(--opk-motion-base) var(--opk-ease-out), transform var(--opk-motion-fast) var(--opk-ease-out);
  width: 100%;
}

.birthday-quick-card:hover,
.birthday-quick-card:focus-visible {
  background: linear-gradient(135deg, rgba(76,157,224,.25), rgba(89,198,166,.16));
  border-color: rgba(132,209,248,.52);
}

.birthday-quick-card:active { transform: scale(.985); }
.birthday-quick-icon { align-items: center; background: rgba(68,155,212,.24); border-radius: 9px; color: #a7dcff; display: inline-flex; flex: 0 0 auto; height: 34px; justify-content: center; width: 34px; }
.birthday-quick-icon .ui-icon { height: 18px; width: 18px; }
.birthday-quick-copy { display: grid; gap: 2px; min-width: 0; }
.birthday-quick-copy strong { color: #eef7ff; font-size: 12px; font-weight: 760; }
.birthday-quick-copy span { color: #a9c4d6; font-size: 10px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birthday-quick-open { color: #8fd1f8; font-size: 10px; font-weight: 760; margin-left: auto; white-space: nowrap; }

.profile-modal { width: min(100%, 620px); }
.birthday-calendar-modal { width: min(100%, 740px); }
.dialog-loading { color: #abc0d0; font-size: 13px; margin: 4px 0; text-align: center; }

.profile-settings-form { display: grid; gap: 16px; }
.profile-identity { align-items: center; background: linear-gradient(135deg, #203747, #1d2d39); border: 1px solid rgba(180,213,237,.13); border-radius: 13px; display: flex; gap: 11px; padding: 12px; }
.profile-identity .avatar { background: linear-gradient(145deg, #6891b6, #3b6085); }
.profile-identity > div { display: grid; gap: 3px; min-width: 0; }
.profile-identity strong { color: #f1f7fc; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity span:not(.avatar) { color: #9fb8ca; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-settings-intro { color: #aec0cd; font-size: 12px; line-height: 1.5; margin: -2px 1px 0; }
.profile-settings-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-settings-form input[aria-invalid="true"] { border-color: #e68b97; box-shadow: 0 0 0 3px rgba(219,77,96,.16); }
.profile-form-feedback { color: #9fd6ba; font-size: 12px; min-height: 18px; margin: -5px 1px 0; }
.profile-settings-actions { align-items: center; flex-wrap: wrap; margin-top: 0; }
.profile-settings-actions .primary-button { margin-left: auto; min-height: 44px; }
.profile-settings-error { display: grid; gap: 10px; }

.birthday-calendar-page { display: grid; gap: 15px; }
.birthday-calendar-intro { color: #a9becd; font-size: 12px; line-height: 1.48; margin: -3px 0 0; }
.birthday-calendar-toolbar { align-items: center; display: grid; gap: 8px; grid-template-columns: 44px minmax(0, 1fr) 44px; text-align: center; }
.birthday-calendar-toolbar strong { color: #f0f7fc; font-size: 17px; font-weight: 750; text-transform: capitalize; }
.birthday-calendar-nav { align-items: center; background: #223440; border: 1px solid rgba(185,217,238,.14); border-radius: 10px; color: #b8d6eb; display: inline-flex; height: 44px; justify-content: center; padding: 0; transition: background-color var(--opk-motion-fast) linear, border-color var(--opk-motion-fast) linear; width: 44px; }
.birthday-calendar-nav:hover,
.birthday-calendar-nav:focus-visible { background: #2b4253; border-color: rgba(122,199,242,.46); }
.birthday-calendar-nav .ui-icon { height: 20px; width: 20px; }

.birthday-month-picker { display: grid; gap: 4px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.birthday-month-picker button { background: #202e3b; border: 1px solid transparent; border-radius: 7px; color: #a8bdcd; font-size: 11px; min-height: 37px; padding: 6px 3px; text-transform: capitalize; transition: background-color var(--opk-motion-fast) linear, color var(--opk-motion-fast) linear, border-color var(--opk-motion-fast) linear; }
.birthday-month-picker button:hover,
.birthday-month-picker button:focus-visible { background: #293b4a; color: #e7f3fb; }
.birthday-month-picker button[aria-pressed="true"] { background: #2e5a78; border-color: rgba(137,210,250,.4); color: #f4fbff; font-weight: 750; }

.birthday-calendar-weekdays,
.birthday-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.birthday-calendar-weekdays { color: #7f9caf; font-size: 10px; font-weight: 740; letter-spacing: .025em; text-align: center; }
.birthday-calendar-weekdays span { padding: 3px 0 7px; }
.birthday-calendar-grid { background: rgba(173,213,238,.1); border: 1px solid rgba(177,214,238,.13); border-radius: 11px; gap: 1px; overflow: hidden; }
.birthday-calendar-day { align-items: center; background: #1c2a35; color: #acc0ce; display: grid; font-size: 12px; justify-items: center; min-height: 48px; padding: 6px 2px; position: relative; }
.birthday-calendar-day.is-empty { background: #192630; }
.birthday-calendar-day.has-birthday { background: #213a4a; color: #f2f9ff; font-weight: 760; }
.birthday-calendar-day.is-current-day { box-shadow: inset 0 0 0 2px #78c6ed; z-index: 1; }
.birthday-calendar-day i { background: #80d3a6; border-radius: 999px; height: 5px; margin-top: 3px; width: 5px; }
.birthday-calendar-day b { color: #bce7fc; font-size: 9px; line-height: 1; min-height: 9px; }

.birthday-calendar-section { border-top: 1px solid rgba(179,214,237,.13); padding-top: 14px; }
.birthday-section-heading { align-items: baseline; display: flex; gap: 8px; justify-content: space-between; }
.birthday-section-heading h4 { color: #eaf4fb; font-size: 13px; margin: 0; text-transform: capitalize; }
.birthday-section-heading > span { color: #96cce9; font-size: 11px; font-weight: 700; }
.birthday-summary-badge { background: rgba(95,193,143,.14); border-radius: 999px; color: #9ee4bb !important; padding: 4px 7px; }
.birthday-person-list,
.birthday-roster-month ul { display: grid; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0; }
.birthday-person { align-items: center; background: #202e3b; border: 1px solid rgba(180,213,236,.12); border-radius: 10px; display: flex; gap: 9px; min-height: 54px; padding: 8px 9px; }
.birthday-person.is-today { background: linear-gradient(135deg, rgba(69,154,120,.23), #20333c); border-color: rgba(114,213,158,.34); }
.birthday-person .avatar { height: 34px; width: 34px; }
.birthday-person-copy { display: grid; gap: 2px; min-width: 0; }
.birthday-person-copy strong { color: #edf7fe; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birthday-person-copy small { color: #a8c2d3; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birthday-today-badge { background: rgba(96,200,146,.14); border-radius: 999px; color: #a9e7c4; font-size: 10px; font-weight: 760; margin-left: auto; padding: 4px 7px; white-space: nowrap; }
.birthday-calendar-empty { color: #9db4c5; font-size: 12px; line-height: 1.5; margin: 10px 0 0; }
.birthday-all-section { display: grid; gap: 8px; }
.birthday-all-roster { display: grid; gap: 9px; max-height: 310px; overflow: auto; padding: 1px 3px 2px 0; scrollbar-color: rgba(143,181,207,.42) transparent; scrollbar-width: thin; }
.birthday-roster-month { background: rgba(32,46,59,.64); border: 1px solid rgba(180,213,236,.1); border-radius: 10px; padding: 9px; }
.birthday-roster-month h4 { color: #9ccce9; font-size: 11px; margin: 0; text-transform: capitalize; }
.birthday-roster-month .birthday-person { background: rgba(23,34,44,.58); min-height: 50px; }
.birthday-calendar-error { display: grid; gap: 8px; }

@media (hover: hover) {
  .birthday-quick-card:hover { transform: translateY(-1px); }
}

@media (max-width: 1180px) {
  .birthday-quick-card { margin-top: 0; }
  .contacts-title-row + .birthday-quick-card { margin-top: 0; }
}

@media (max-width: 720px) {
  .birthday-quick-card { margin-bottom: 10px; min-height: 52px; }
  .birthday-quick-copy strong { font-size: 12px; }
  .birthday-quick-copy span { font-size: 10px; }
  .profile-modal,
  .birthday-calendar-modal { max-height: calc(100dvh - 24px); padding: 17px; width: min(100%, calc(100vw - 24px)); }
  .profile-settings-grid { grid-template-columns: 1fr; }
  .profile-settings-actions .primary-button { margin-left: 0; width: 100%; }
  .birthday-month-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .birthday-calendar-day { min-height: 43px; }
  .birthday-calendar-toolbar strong { font-size: 16px; }
}

@media (max-width: 420px) {
  .birthday-quick-open { display: none; }
  .birthday-month-picker button { font-size: 10px; }
  .birthday-calendar-day { min-height: 39px; }
  .birthday-person-copy small { white-space: normal; }
}

@media (forced-colors: active) {
  .birthday-quick-card,
  .birthday-calendar-day.has-birthday,
  .birthday-person.is-today { border: 1px solid Highlight; }
}
