:root {
  --blue-900: #153f65;
  --blue-700: #0b6eb7;
  --blue-500: #2b91d1;
  --blue-300: #92c9ed;
  --blue-100: #e7f5ff;
  --green-600: #64a51f;
  --green-400: #95cf45;
  --ink: #19344e;
  --muted: #668096;
  --line: #9fc7e4;
  --surface: #fff;
  --surface-soft: #f3f9fd;
  --shadow: 0 18px 55px rgba(27, 80, 119, .28), 0 2px 8px rgba(24, 68, 101, .2);
  --radius: 12px;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-size: 15px; line-height: 1.45; background: #cde9fa; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(36, 130, 201, .35); outline-offset: 2px; }
[hidden], .hidden { display: none !important; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.02em; }
.brand-large { font-size: 27px; }
.brand-mark { width: 46px; height: 38px; display: inline-block; position: relative; filter: drop-shadow(0 2px 2px rgba(23, 77, 110, .22)); }
.brand-mark::before, .brand-mark::after, .brand-mark i, .brand-mark b { content: ""; position: absolute; display: block; border-radius: 55% 55% 50% 50%; transform: rotate(-12deg); }
.brand-mark::before { width: 24px; height: 26px; left: 3px; top: 2px; background: linear-gradient(135deg, #7dc4f2 8%, #147bc1 72%); border: 2px solid #fff; }
.brand-mark::after { width: 21px; height: 23px; right: 1px; bottom: 1px; background: linear-gradient(135deg, #b5e96d 5%, #68aa22 73%); border: 2px solid #fff; }
.brand-mark i { width: 10px; height: 5px; left: 0; bottom: 4px; background: #1778b9; transform: rotate(-34deg); }
.brand-mark b { width: 9px; height: 5px; right: 0; top: 5px; background: #6fac28; transform: rotate(28deg); }
.brand-mark.small { width: 30px; height: 26px; transform: scale(.72); transform-origin: left center; margin-right: -7px; }

.auth-page { min-height: 100vh; background: radial-gradient(circle at 78% 3%, #fff 0 5%, transparent 34%), linear-gradient(145deg, #e8f8ff 0, #c5e8fb 48%, #a6d5f1 100%); overflow-x: hidden; }
.auth-page::before, .auth-page::after { content: ""; position: fixed; pointer-events: none; border-radius: 50%; opacity: .34; filter: blur(2px); }
.auth-page::before { width: 520px; height: 520px; right: -170px; bottom: -250px; border: 45px solid #83bb37; }
.auth-page::after { width: 380px; height: 380px; left: -220px; top: -150px; border: 35px solid #3e9cd6; }
.auth-stage { width: min(1120px, calc(100% - 40px)); min-height: 100vh; margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 72px; align-items: center; padding: 46px 0; position: relative; z-index: 1; }
.auth-showcase h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.04; letter-spacing: -.055em; margin: 26px 0 18px; color: #143e61; font-family: "Trebuchet MS", Tahoma, sans-serif; }
.auth-showcase h1 em { color: #64a51f; font-style: normal; }
.auth-showcase > p { max-width: 610px; font-size: 18px; color: #446983; margin: 0 0 26px; }
.showcase-window { width: min(470px, 94%); background: rgba(255,255,255,.76); border: 1px solid rgba(74, 145, 196, .6); border-radius: 11px; box-shadow: 0 18px 45px rgba(36, 89, 128, .2); backdrop-filter: blur(8px); overflow: hidden; transform: rotate(-1deg); }
.mini-titlebar { display: flex; justify-content: space-between; padding: 9px 13px; background: linear-gradient(#63b0e3, #1680c7); color: #fff; font-size: 13px; text-shadow: 0 1px #1c6493; }
.mini-profile { display: flex; align-items: center; gap: 11px; padding: 14px 16px; background: linear-gradient(90deg, #e5f6ff, #fff); border-bottom: 1px solid #b9d9ee; }
.mini-profile div, .mini-contact div { min-width: 0; display: flex; flex-direction: column; }
.mini-profile small, .mini-contact small { color: #6c879a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-avatar { width: 39px; height: 39px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: bold; border: 2px solid #fff; box-shadow: 0 0 0 1px #87b1cd; }
.avatar-lime { background: linear-gradient(135deg, #b7e46d, #5f9e25); }
.avatar-coral { background: linear-gradient(135deg, #ff9f86, #d64d5f); }
.avatar-blue { background: linear-gradient(135deg, #7acaf6, #3276bc); }
.avatar-gold { background: linear-gradient(135deg, #ffd36d, #d38c23); }
.mini-contact { padding: 9px 15px; display: grid; grid-template-columns: 39px 1fr 9px; align-items: center; gap: 11px; border-bottom: 1px solid #d8e8f2; }
.mini-contact i { width: 9px; height: 9px; border-radius: 50%; background: #70b32c; box-shadow: 0 0 0 3px #e5f3d8; }
.mini-contact.busy i { background: #d74646; box-shadow: 0 0 0 3px #f7dddd; }
.mini-contact.away i { background: #e4a823; box-shadow: 0 0 0 3px #f9edcb; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.feature-pills span { padding: 7px 11px; border: 1px solid rgba(65,135,183,.35); border-radius: 99px; background: rgba(255,255,255,.52); color: #35617e; font-size: 13px; }

.aero-window { border: 1px solid #73a9d1; border-radius: 13px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(14px); }
.window-titlebar { height: 50px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: linear-gradient(180deg, #62b2e7 0, #258dce 48%, #0874bd 51%, #177fbe 100%); text-shadow: 0 1px #17618d; box-shadow: inset 0 1px rgba(255,255,255,.65); }
.window-dots { display: flex; gap: 5px; }.window-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); background: linear-gradient(#f4fbff,#9ecae6); }
.auth-body { padding: 28px 34px 24px; }
.auth-orb { width: 88px; height: 88px; margin: 0 auto 20px; border: 1px solid #98c5e2; border-radius: 24px; display: grid; place-items: center; background: radial-gradient(circle at 35% 20%, #fff, #e3f3fd 58%, #bbdcf1); box-shadow: inset 0 0 0 5px #fff, 0 7px 20px rgba(25, 89, 131, .16); }
.auth-orb .brand-mark { transform: scale(1.18); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border-bottom: 1px solid #bed8e9; }
.auth-tabs button { border: 0; background: none; padding: 10px; color: #69849a; }
.auth-tabs button.active { color: #126fab; font-weight: bold; border-bottom: 3px solid #79b62e; }
.auth-form { display: grid; gap: 14px; }
.auth-form label, .dialog-body label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
input, select, textarea { border: 1px solid #98bad1; border-radius: 6px; background: #fff; padding: 9px 10px; min-width: 0; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #5f9ec9; }
input:focus, select:focus, textarea:focus { border-color: #2386c8; box-shadow: 0 0 0 3px rgba(35,134,200,.12); outline: none; }
.auth-form small { font-weight: normal; color: var(--muted); }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; font-weight: normal !important; }
.check-row input { width: 16px; height: 16px; margin: 0; padding: 0; }
.primary-button, .secondary-button, .send-button { border-radius: 6px; padding: 9px 16px; font-weight: bold; }
.primary-button, .send-button { color: #fff; border: 1px solid #4d831b; background: linear-gradient(#9ad753 0, #75b530 49%, #5f9d21 51%, #78b63a 100%); text-shadow: 0 1px #527e27; box-shadow: inset 0 1px rgba(255,255,255,.65), 0 1px 2px rgba(36,78,20,.22); }
.primary-button:hover, .send-button:hover { filter: brightness(1.05); }
.secondary-button { border: 1px solid #74a7ca; background: linear-gradient(#fff,#e4f2fb); color: #146da7; }
.auth-note { margin: 20px 0 0; text-align: center; font-size: 12px; color: #7890a2; }

.app-page { overflow: hidden; height: 100vh; background: linear-gradient(135deg, #b8def6, #e9f8ff 45%, #c3e6f8); }
.messenger { --accent: #1680c4; --accent-2: #78b532; width: min(1500px, calc(100vw - 28px)); height: min(920px, calc(100vh - 28px)); margin: 14px auto; border: 1px solid #609ecb; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); position: relative; }
.messenger.theme-lime { --accent: #5c9a29; --accent-2: #1887c9; }
.messenger.theme-violet { --accent: #7553b9; --accent-2: #2395c7; }
.messenger.theme-sunset { --accent: #d26748; --accent-2: #e2a327; }
.messenger.skin-midnight { --ink: #e5f4ff; --muted: #9db6c8; --surface: #172b3a; --surface-soft: #203746; --line: #3c6078; color: var(--ink); }
.app-titlebar { height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px; color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--accent), #fff 36%), var(--accent) 50%, color-mix(in srgb, var(--accent), #123 12%) 52%, var(--accent)); box-shadow: inset 0 1px rgba(255,255,255,.72), inset 0 -1px rgba(0,0,0,.15); text-shadow: 0 1px rgba(0,0,0,.35); }
.top-actions { display: flex; gap: 3px; }
.icon-button { width: 32px; height: 30px; border: 1px solid transparent; border-radius: 5px; display: inline-grid; place-items: center; background: transparent; color: inherit; text-decoration: none; position: relative; }
.app-titlebar .icon-button:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.28); }
.icon-button b { position: absolute; right: -3px; top: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e94c4c; color: #fff; font-size: 11px; line-height: 17px; text-align: center; text-shadow: none; }
.app-layout { height: calc(100% - 43px); display: grid; grid-template-columns: 342px minmax(0,1fr); }
.contacts-pane { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
.profile-card { min-height: 105px; display: flex; align-items: center; gap: 13px; padding: 14px; background: radial-gradient(circle at 90% 0, rgba(255,255,255,.95), transparent 50%), linear-gradient(130deg, color-mix(in srgb, var(--accent), #fff 84%), color-mix(in srgb, var(--accent-2), #fff 86%)); border-bottom: 1px solid var(--line); }
.avatar-button { flex: 0 0 auto; border: 0; background: none; padding: 3px; position: relative; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px #76a8c8, 0 2px 7px rgba(29,77,106,.18); background: linear-gradient(135deg, #81c8f0, #287cb8); color: #fff; font-weight: bold; text-transform: uppercase; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xl { width: 64px; height: 64px; border-radius: 12px; font-size: 24px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 10px; font-size: 19px; }
.avatar-md { width: 39px; height: 39px; border-radius: 8px; font-size: 15px; }
.presence-dot { position: absolute; right: 0; bottom: 3px; width: 14px; height: 14px; border-radius: 50%; background: #73b72d; border: 2px solid #fff; box-shadow: 0 0 0 1px #609823; }
.profile-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.profile-name, .profile-message { padding: 0; border: 0; background: transparent; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name { font-size: 17px; font-weight: bold; color: var(--ink); }
.profile-message { color: var(--muted); font-size: 12px; }
#quick-status { border: 0; background: transparent; padding: 1px 17px 1px 0; width: fit-content; color: #4e7627; font-size: 12px; box-shadow: none; }
.contact-tools { display: grid; grid-template-columns: 1fr 36px; gap: 7px; padding: 10px; background: var(--surface-soft); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box span { position: absolute; left: 10px; color: var(--muted); font-size: 18px; }
.search-box input { width: 100%; padding-left: 30px; background: var(--surface); color: var(--ink); }
.add-button { border: 1px solid #76a7ca; border-radius: 6px; background: linear-gradient(#fff,#dceffa); color: #1577b8; font-size: 22px; }
.pane-tabs { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.pane-tabs button { border: 0; border-right: 1px solid var(--line); background: transparent; padding: 8px 2px; color: var(--muted); font-size: 12px; }
.pane-tabs button:last-child { border-right: 0; }
.pane-tabs button.active { color: var(--accent); font-weight: bold; background: var(--surface); box-shadow: inset 0 -3px var(--accent-2); }
.contact-list { flex: 1; min-height: 0; overflow-y: auto; background: var(--surface); }
.contact-group { border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 45%); }
.group-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: linear-gradient(90deg, var(--surface-soft), var(--surface)); padding: 7px 10px; color: var(--ink); font-weight: bold; text-align: left; }
.group-heading span:first-child::before { content: "▾"; display: inline-block; width: 15px; color: var(--accent); }
.contact-group.collapsed .group-heading span:first-child::before { content: "▸"; }
.group-heading small { font-weight: normal; color: var(--muted); }
.contact-group.collapsed .group-contacts { display: none; }
.contact-row { width: 100%; border: 0; border-left: 3px solid transparent; background: var(--surface); display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; align-items: center; padding: 7px 9px 7px 7px; text-align: left; color: var(--ink); }
.contact-row:hover, .contact-row.active { background: color-mix(in srgb, var(--accent), #fff 89%); border-left-color: var(--accent); }
.contact-row.offline { opacity: .65; filter: grayscale(.45); }
.contact-copy { min-width: 0; display: grid; }
.contact-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-message { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-status { width: 9px; height: 9px; border-radius: 50%; background: #70b12b; box-shadow: 0 0 0 3px #e6f2d8; }
.contact-row.busy .contact-status { background: #d64646; box-shadow: 0 0 0 3px #f5dede; }
.contact-row.away .contact-status, .contact-row.brb .contact-status, .contact-row.phone .contact-status, .contact-row.lunch .contact-status { background: #e4a522; box-shadow: 0 0 0 3px #faedc9; }
.contact-row.offline .contact-status { background: #9dacb6; box-shadow: 0 0 0 3px #e4e9ec; }
.contact-item { position: relative; }.contact-item .contact-row { padding-right: 34px; }.contact-more { position:absolute;right:5px;top:50%;transform:translateY(-50%);width:27px;height:27px;border:0;border-radius:5px;background:transparent;color:var(--muted);opacity:0; }.contact-item:hover .contact-more,.contact-more:focus{opacity:1}.contact-more:hover{background:color-mix(in srgb,var(--accent),#fff 85%)}
.unread-count{min-width:20px;height:20px;border-radius:10px;padding:0 5px;display:grid;place-items:center;background:var(--accent);color:#fff;font-size:11px;font-weight:bold}.contact-context{width:230px;display:grid;gap:6px}.contact-context>strong{padding:3px 5px;border-bottom:1px solid var(--line)}.contact-context>button,.contact-context label{border:0;background:transparent;text-align:left;padding:7px;border-radius:5px;font-weight:normal;font-size:13px}.contact-context>button:hover{background:var(--surface-soft)}.contact-context label{display:grid;gap:4px}.contact-context select{padding:5px}.contact-context .danger{color:#a93636}
.favorite-star { color: #e3a31b; margin-right: 5px; }
.request-strip { padding: 7px 10px; background: #fff9df; border-top: 1px solid #ead38b; }
.request-strip button { width: 100%; border: 0; background: none; color: #7b6111; text-align: left; }
.contacts-footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); background: var(--surface-soft); padding: 8px; }
.contacts-footer button { border: 0; background: none; color: var(--accent); font-size: 12px; }

.chat-pane { min-width: 0; background: var(--surface); display: flex; flex-direction: column; position: relative; }
.conversation-tabs { min-height: 35px; display: flex; overflow-x: auto; background: color-mix(in srgb, var(--accent), #fff 89%); border-bottom: 1px solid var(--line); }
.conversation-tab { max-width: 190px; min-width: 120px; border: 0; border-right: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 1fr 20px; align-items: center; padding: 0 4px 0 10px; color: var(--muted); }
.conversation-tab > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.conversation-tab.active { background: var(--surface); color: var(--ink); font-weight: bold; box-shadow: inset 0 3px var(--accent-2); }
.conversation-tab .tab-close { border: 0; background: transparent; color: inherit; border-radius: 3px; }
.conversation-tab .tab-close:hover { background: #e75a5a; color: #fff; }
.empty-chat { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; background: radial-gradient(circle at 50% 20%, #fff 0 12%, transparent 44%), linear-gradient(#eef9ff,#d7effb); }
.empty-chat-orb { width: 126px; height: 126px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #92c5e4; background: radial-gradient(circle at 35% 25%, #fff 0, #e6f6ff 50%, #afd8ef); box-shadow: inset 0 0 0 8px rgba(255,255,255,.55), 0 15px 35px rgba(39,100,138,.2); }
.empty-chat-orb .brand-mark { transform: scale(1.7); }
.empty-chat h2 { margin: 25px 0 5px; font-family: "Trebuchet MS",sans-serif; font-size: 25px; color: #23597d; }
.empty-chat p { max-width: 480px; margin: 0 0 20px; color: #67869a; }
.conversation { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.conversation-header { min-height: 73px; display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: linear-gradient(90deg, var(--surface), var(--surface-soft)); border-bottom: 1px solid var(--line); }
.mobile-back{display:none;border:0;background:transparent;color:var(--accent);font-size:30px;padding:0 8px 0 0}
.conversation-person { display: flex; align-items: center; min-width: 0; gap: 11px; }
.conversation-person h2 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-person p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.conversation-actions { display: flex; }.conversation-actions .icon-button { color: var(--accent); font-size: 19px; }
.conversation-actions .icon-button:hover { background: color-mix(in srgb, var(--accent), #fff 88%); }
.message-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background-color: #fafdff; }
.background-clouds { background-image: radial-gradient(ellipse at 5% 15%, rgba(255,255,255,.9) 0 4%, transparent 4.5%), radial-gradient(ellipse at 12% 18%, rgba(255,255,255,.75) 0 6%, transparent 6.5%), linear-gradient(180deg,#e7f6ff,#fafdff 45%); }
.background-bubbles { background-color:#eefaff; background-image: radial-gradient(circle at 15px 15px, transparent 0 8px, rgba(65,158,213,.12) 9px 10px, transparent 11px), radial-gradient(circle at 46px 42px, transparent 0 5px, rgba(116,181,50,.13) 6px 7px, transparent 8px); background-size: 62px 62px; }
.background-night { background-color: #142b45; background-image: radial-gradient(circle at 20% 12%,rgba(255,255,255,.75) 0 1px,transparent 2px),radial-gradient(circle at 68% 30%,rgba(255,255,255,.5) 0 1px,transparent 2px); background-size: 90px 80px; }
.background-paper { background-color:#fffef7; background-image: linear-gradient(rgba(73,133,170,.09) 1px,transparent 1px); background-size:100% 24px; }
.message-list { height: 100%; overflow-y: auto; padding: 18px 19px 12px; scroll-behavior: smooth; }
.load-older{display:block;margin:0 auto 14px;border:1px solid #8eb7d2;border-radius:14px;background:rgba(255,255,255,.9);color:#2673a4;padding:5px 12px}
.message { display: grid; grid-template-columns: 38px minmax(0, 620px); gap: 9px; margin-bottom: 13px; align-items: start; }
.message.own { grid-template-columns: minmax(0, 620px) 38px; justify-content: end; }
.message.own .message-avatar { grid-column: 2; }.message.own .message-main { grid-column: 1; grid-row: 1; align-items: flex-end; }
.message-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.message-meta { display: flex; gap: 7px; align-items: baseline; padding: 0 3px 3px; color: #5f7b90; font-size: 11px; }
.message-meta strong { color: #246a9a; font-size: 12px; }
.message-bubble { max-width: 100%; border: 1px solid #a8c9df; border-radius: 4px 11px 11px; background: rgba(255,255,255,.94); box-shadow: 0 2px 5px rgba(34,82,111,.1); padding: 8px 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.message.own .message-bubble { border-color: #a7ce82; border-radius: 11px 4px 11px 11px; background: rgba(241,251,230,.96); }
.background-night .message-bubble { color: #19344e; }
.message.system, .message.event { display: block; text-align: center; margin: 12px auto; }
.message.system .message-bubble { display: inline-block; border: 0; border-radius: 20px; background: rgba(37,95,132,.1); box-shadow: none; padding: 5px 12px; color: #5c7588; font-size: 12px; }
.message.event .message-bubble { border-color: #f0c256; background: #fff9d9; color: #735811; animation: eventPop .45s ease; }
.inline-emoticon { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; margin: -4px 2px; }
.message-image { max-width: min(420px,100%); max-height: 330px; display: block; border-radius: 7px; margin-top: 6px; }
.file-card { display: grid; grid-template-columns: 38px 1fr; gap: 9px; align-items: center; min-width: 230px; color: inherit; text-decoration: none; }
.file-card > span:first-child { width: 38px; height: 38px; display: grid; place-items:center; border-radius:7px; background:#e3f2fb; font-size:20px; }
.file-card small { display:block;color:#71889a; }
.new-message-pill { position: absolute; right: 18px; bottom: 12px; border: 1px solid #4b91bd; border-radius: 15px; padding: 5px 11px; background: #fff; color: #1a70aa; box-shadow: 0 3px 10px rgba(31,85,119,.2); }
.composer-tools { min-height: 38px; padding: 4px 11px; display: flex; align-items: center; gap: 3px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.composer-tools button, .tool-file { width: 31px; height: 29px; padding: 0; border: 1px solid transparent; border-radius: 5px; display: grid; place-items: center; background: transparent; font-size: 18px; }
.composer-tools button:hover, .tool-file:hover { border-color: var(--line); background: var(--surface); }
.typing-indicator { margin-left: auto; color: var(--muted); font-size: 11px; }
.composer { min-height: 76px; display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: stretch; padding: 8px 11px 11px; background: var(--surface-soft); }
.composer textarea { min-height: 55px; max-height: 130px; resize: none; background: var(--surface); color: var(--ink); }
.send-button { align-self: stretch; min-width: 78px; }

.notification-drawer { position: absolute; z-index: 25; right: 10px; top: 48px; width: min(380px,calc(100% - 20px)); max-height: calc(100% - 60px); overflow: hidden; border: 1px solid #79acd1; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.notification-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; background: linear-gradient(#eaf7ff,#d3ebfa); border-bottom: 1px solid var(--line); }
.notification-drawer h2 { margin: 0; font-size: 16px; }.notification-drawer header button { border:0;background:none;font-size:20px; }
#notification-list { max-height: 540px; overflow-y: auto; }.notification { padding: 11px 13px; border-bottom: 1px solid #dbe8f1; }.notification.unread { background:#f0f9ff; }.notification p { margin:2px 0;color:var(--muted);font-size:13px; }.notification small { color:#8095a3; }

.popover { position: absolute; z-index: 20; border: 1px solid #78abd0; border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 35px rgba(33,82,115,.27); padding: 10px; }
.emoticon-picker { left: 365px; bottom: 126px; width: 310px; }.popover header { display:flex;justify-content:space-between;align-items:center;margin-bottom:8px; }.popover header button { border:0;background:none;color:var(--accent);font-size:12px; }
#emoticon-grid { display:grid;grid-template-columns:repeat(7,1fr);gap:3px; }.emoticon-option { min-width:32px;height:32px;border:1px solid transparent;border-radius:4px;background:none;font-size:21px; }.emoticon-option:hover { border-color:var(--line);background:var(--surface-soft); }.emoticon-option img { width:24px;height:24px;object-fit:contain; }
.wink-picker { left: 410px; bottom: 126px; width: 230px; }.wink-picker > div { display:grid;grid-template-columns:1fr 1fr;gap:7px; }.wink-option { padding:9px;border:1px solid var(--line);border-radius:6px;background:var(--surface-soft); }.background-picker { left:530px;bottom:126px; }.background-picker > div { display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px; }.background-picker button { border:1px solid var(--line);background:var(--surface-soft);padding:6px;border-radius:5px; }

.modal-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(12,37,55,.35); backdrop-filter: blur(2px); }
.retro-dialog { z-index: 40; width: min(470px,calc(100vw - 24px)); max-height: min(720px,calc(100vh - 24px)); padding: 0; border: 1px solid #609dcc; border-radius: 11px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.retro-dialog::backdrop { background: transparent; }.wide-dialog { width:min(650px,calc(100vw - 24px)); }
.dialog-shell { margin:0; }.dialog-shell > header { min-height:43px;display:flex;align-items:center;justify-content:space-between;padding:7px 10px 7px 15px;color:#fff;background:linear-gradient(#5ba9dc,#1179bd); }.dialog-shell h2 { margin:0;font-size:16px;text-shadow:0 1px #1c628f; }.dialog-shell > header button { width:28px;height:27px;border:1px solid rgba(255,255,255,.4);border-radius:4px;background:linear-gradient(#ee8585,#ba3333);color:#fff;font-size:19px;line-height:20px; }
.dialog-body { padding:18px;max-height:calc(100vh - 100px);overflow-y:auto; }.dialog-body form { display:grid;gap:14px; }.dialog-body textarea { min-height:72px; }.dialog-body fieldset { border:1px solid var(--line);border-radius:7px; }.member-picker { max-height:260px;overflow-y:auto;display:grid;gap:4px; }.member-choice { display:flex;align-items:center;gap:8px;padding:6px;border-radius:5px; }.member-choice:hover{background:var(--surface-soft)}
.request-card { display:grid;grid-template-columns:44px 1fr;gap:10px;padding:11px;border:1px solid var(--line);border-radius:7px;margin-bottom:9px; }.request-card p{margin:3px 0;color:var(--muted);}.request-actions{display:flex;gap:7px;margin-top:7px}.request-actions button{padding:5px 9px;border:1px solid var(--line);border-radius:5px;background:var(--surface-soft)}.request-actions .accept{color:#397b12;border-color:#9bc37d;background:#f0fae9}
.settings-grid { grid-template-columns:1fr 1fr;align-items:start; }.settings-grid section{display:grid;gap:10px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.settings-grid h3{margin:0 0 3px}.settings-save{grid-column:1/-1}.setting-note{font-size:12px;color:var(--muted);margin:0}.info-list{display:grid;gap:8px}.info-member{display:flex;align-items:center;gap:9px;padding:7px;border-bottom:1px solid var(--line)}

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px,calc(100vw - 36px)); pointer-events: none; }
.toast { padding: 11px 13px; border: 1px solid #76a9ca; border-radius: 8px; background: rgba(255,255,255,.96); color:#173a54;box-shadow:0 7px 25px rgba(25,67,94,.25);animation:toastIn .28s ease; }.toast.error{border-color:#d17e7e;background:#fff1f1;color:#7e2929}.toast.success{border-color:#8ebd6c;background:#f4ffed;color:#3d711c}
.wink-overlay { position:fixed;z-index:80;inset:0;display:grid;place-items:center;background:rgba(9,27,42,.64);color:#fff;text-align:center; }.wink-scene{font-size:clamp(80px,18vw,210px);filter:drop-shadow(0 14px 30px rgba(0,0,0,.35));animation:winkBurst 2.8s both}.wink-overlay>button{position:absolute;top:22px;right:22px;border:1px solid rgba(255,255,255,.5);border-radius:7px;background:rgba(0,0,0,.25);color:#fff;padding:8px 13px}
.nudge { animation:nudge .48s ease; }
.empty-note { padding:28px 15px;text-align:center;color:var(--muted); }.list-skeleton { padding:12px }.skeleton-line{height:54px;margin-bottom:7px;border-radius:8px;background:linear-gradient(90deg,#eef5f9,#fff,#eef5f9);background-size:200% 100%;animation:shimmer 1.2s infinite}

.compact .contact-row { padding-top:4px;padding-bottom:4px; }.compact .avatar-md{width:32px;height:32px}.compact .contact-row{grid-template-columns:35px 1fr auto}.skin-classic{border-radius:3px}.skin-classic .app-titlebar{background:linear-gradient(#559bcd,#0870b3)}.skin-classic .profile-card{min-height:88px}.skin-classic .avatar-xl{width:54px;height:54px;border-radius:4px}.skin-midnight .message-stage:not(.background-paper):not(.background-clouds):not(.background-bubbles){background-color:#102335}

@keyframes shimmer { to { background-position:-200% 0; } }
@keyframes toastIn { from { opacity:0;transform:translateY(9px) scale(.98) } }
@keyframes eventPop { 0%{transform:scale(.72);opacity:.25}70%{transform:scale(1.06)} }
@keyframes nudge { 0%,100%{transform:translate(0)}20%{transform:translate(-10px,3px)}40%{transform:translate(10px,-3px)}60%{transform:translate(-7px,-2px)}80%{transform:translate(7px,2px)} }
@keyframes winkBurst { 0%{opacity:0;transform:scale(.1) rotate(-20deg)}28%{opacity:1;transform:scale(1.15) rotate(6deg)}44%{transform:scale(.92) rotate(-3deg)}75%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.8) rotate(12deg)} }

@media (max-width: 900px) {
  .auth-stage { grid-template-columns: 1fr; max-width: 520px; gap: 28px; }
  .auth-showcase { text-align:center; }.auth-showcase>p{margin-left:auto;margin-right:auto}.showcase-window{margin:auto}.feature-pills{justify-content:center}
  .messenger { width:100vw;height:100vh;margin:0;border:0;border-radius:0; }
  .app-layout { grid-template-columns: 305px minmax(0,1fr); }
  .emoticon-picker { left:320px }.wink-picker{left:365px}.background-picker{left:485px}
}
@media (max-width: 680px) {
  .auth-stage { width:min(100% - 22px,460px);padding:22px 0 }.auth-showcase h1{font-size:38px}.showcase-window{display:none}.feature-pills{display:none}.auth-card{border-radius:10px}.auth-body{padding:23px}
  .app-layout { display:block;position:relative }.contacts-pane { width:100%;height:100%;border:0 }.chat-pane { position:absolute;inset:0;transform:translateX(100%);transition:transform .25s ease;z-index:5 }.messenger.chat-open .chat-pane{transform:translateX(0)}
  .mobile-back{display:block}.conversation-person{flex:1}.conversation-actions .icon-button:nth-child(-n+2){display:none}.conversation-tabs{min-height:32px}.conversation-tab{min-width:100px}.message-list{padding:12px 10px}.message{grid-template-columns:33px minmax(0,1fr)}.message.own{grid-template-columns:minmax(0,1fr) 33px}.message .avatar-md{width:31px;height:31px}.composer{grid-template-columns:1fr 70px}.emoticon-picker,.wink-picker,.background-picker{left:8px;bottom:126px;max-width:calc(100% - 16px)}.settings-grid{grid-template-columns:1fr}.settings-save{grid-column:auto}
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important} }

.admin-page{min-height:100vh;background:linear-gradient(135deg,#c9e9fb,#edf9ff);padding:16px}.admin-shell{width:min(1320px,100%);min-height:calc(100vh - 32px);margin:auto;border:1px solid #6a9fc5;border-radius:12px;overflow:hidden;background:#fff;box-shadow:var(--shadow)}.admin-titlebar{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 15px;color:#fff;background:linear-gradient(#55a7dc,#1478b9);text-shadow:0 1px #1a638f}.admin-titlebar a{color:#fff}.admin-layout{display:grid;grid-template-columns:240px 1fr;min-height:calc(100vh - 80px)}.admin-sidebar{display:flex;flex-direction:column;background:linear-gradient(#edf8ff,#dceefa);border-right:1px solid #a8cae2}.admin-user{display:flex;gap:10px;align-items:center;padding:18px;border-bottom:1px solid #b7d4e7}.admin-user div{display:grid}.admin-user small{color:#678398}.admin-sidebar nav{display:grid;padding:10px}.admin-sidebar nav button{border:0;border-radius:6px;background:transparent;text-align:left;padding:10px;color:#345b77}.admin-sidebar nav button:hover,.admin-sidebar nav button.active{background:#fff;color:#126fae;box-shadow:0 1px 4px rgba(31,81,113,.14)}.admin-sidebar>p{margin:auto 15px 15px;color:#7890a2;font-size:12px}.admin-content{min-width:0;padding:26px;background:#f7fbfe}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.panel-heading h1{margin:0;font:28px "Trebuchet MS",sans-serif;color:#1b587f}.panel-heading p{margin:3px 0;color:#6b8496}.panel-heading .search-box{width:min(330px,100%)}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat-grid article,.admin-card{border:1px solid #b6d3e7;border-radius:9px;background:#fff;box-shadow:0 3px 11px rgba(27,76,106,.08);padding:17px}.stat-grid article{display:grid;gap:4px;min-height:112px}.stat-grid span,.stat-grid small{color:#6d8798}.stat-grid strong{font:30px "Trebuchet MS",sans-serif;color:#1778b8}.stat-grid article:last-child{grid-column:span 2}.admin-card h2{margin-top:0}.table-wrap{padding:0;overflow:auto}.table-wrap table{width:100%;border-collapse:collapse}.table-wrap th,.table-wrap td{text-align:left;padding:12px;border-bottom:1px solid #dbe8f1}.table-wrap th{background:#eaf6fd;color:#456a83}.table-wrap td small{display:block;color:#758b9b}.admin-status{display:inline-block;padding:3px 7px;border-radius:10px;background:#edf6e6;color:#4d782e;font-size:11px}.admin-status.banned,.admin-status.open{background:#ffe8e8;color:#9b3535}.admin-status.reviewed{background:#e9f4ff;color:#286c9a}.admin-status.dismissed{background:#eee;color:#666}.admin-settings{max-width:650px;display:grid;gap:15px}.report-list{display:grid;gap:10px}.report-card header{display:flex;justify-content:space-between}.report-card p{color:#435f73}.report-card small{color:#738b9d}.report-card div{display:flex;gap:7px;margin-top:12px}.report-card button{border:1px solid #94bad4;border-radius:5px;background:#eef8fe;padding:6px 9px}@media(max-width:850px){.admin-layout{grid-template-columns:1fr}.admin-sidebar{border-right:0;border-bottom:1px solid #abcbe0}.admin-sidebar nav{grid-template-columns:repeat(4,1fr)}.admin-sidebar>p{display:none}.admin-content{padding:16px}.stat-grid{grid-template-columns:1fr 1fr}.admin-user{padding:10px}.panel-heading{align-items:flex-start;flex-direction:column}.panel-heading .search-box{width:100%}}@media(max-width:520px){.admin-page{padding:0}.admin-shell{border:0;border-radius:0;min-height:100vh}.admin-sidebar nav{grid-template-columns:1fr 1fr}.stat-grid{grid-template-columns:1fr}.stat-grid article:last-child{grid-column:auto}.admin-titlebar .brand span:last-child{font-size:12px}}
