@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  color: #17212f;
  background: #eef2f6;
  font-synthesis: none;
  --primary: #1570ef;
  --primary-dark: #0b5bd3;
  --green: #12b76a;
  --text: #17212f;
  --muted: #697586;
  --line: #e7ebf0;
  --soft: #f4f6f8;
  --surface: #fff;
  --danger: #d92d20;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; min-height: 100%; }
body { min-width: 320px; background: #eef2f6; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { color: inherit; border: 0; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, textarea, select { color: var(--text); }
svg { width: 20px; height: 20px; stroke-width: 1.8; flex: 0 0 auto; }
a { color: inherit; text-decoration: none; }

.primary, .soft { min-height: 42px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; font-weight: 600; white-space: nowrap; }
.primary { background: var(--primary); color: #fff; box-shadow: 0 5px 14px rgba(21,112,239,.2); }
.primary:hover { background: var(--primary-dark); }
.soft { background: #edf4ff; color: var(--primary); }
.wide { width: 100%; }
.text-button, .text-action { background: transparent; color: var(--primary); font-weight: 600; }
.text-action { padding: 8px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: transparent; }
.icon-button:hover { background: #eef2f6; }
.icon-button svg { width: 21px; height: 21px; }
.icon-button.danger { color: #98a2b3; }
.icon-button.danger:hover { color: var(--danger); background: #fef3f2; }
.avatar { border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: white; overflow: hidden; font-weight: 600; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.group-avatar { background: #12b76a !important; }
.splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); background: #f8fafc; }
.brand-mark { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--primary); font-size: 22px; font-weight: 700; box-shadow: 0 7px 18px rgba(21,112,239,.25); }
.brand-mark.large { width: 52px; height: 52px; font-size: 27px; }

/* Authentication */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.08fr) minmax(420px, .92fr); background: #fff; }
.auth-visual { position: relative; overflow: hidden; padding: 54px 64px; background: #0c1f32; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.auth-visual::before { content: ''; position: absolute; inset: 0; background: linear-gradient(145deg, transparent 25%, rgba(21,112,239,.16)), radial-gradient(circle at 80% 12%, rgba(18,183,106,.22), transparent 28%); }
.visual-brand, .visual-copy, .chat-scene { position: relative; z-index: 2; }
.visual-brand { display: flex; align-items: center; gap: 16px; }
.visual-brand strong { display: block; font-size: 25px; }
.brand-logo { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.visual-brand span { display: block; color: #adc0d1; font-size: 14px; margin-top: 3px; }
.visual-copy { max-width: 600px; }
.visual-copy h1 { margin: 0 0 14px; font-size: clamp(34px, 4vw, 52px); line-height: 1.18; font-weight: 700; }
.visual-copy p { margin: 0; color: #b9c9d8; font-size: 17px; line-height: 1.8; }
.chat-scene { align-self: center; width: min(520px, 90%); height: 290px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); border-radius: 8px; backdrop-filter: blur(8px); }
.chat-scene::before { content: ''; position: absolute; left: 50%; top: 34px; bottom: 35px; width: 1px; background: linear-gradient(transparent, rgba(255,255,255,.25), transparent); transform: rotate(28deg); }
.scene-avatar { position: absolute; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.scene-avatar svg { width: 28px; height: 28px; }
.scene-avatar.a { background: #1570ef; left: 15%; top: 55px; }
.scene-avatar.b { background: #12b76a; right: 15%; top: 92px; }
.scene-avatar.c { background: #7a5af8; left: 42%; bottom: 27px; }
.scene-bubble { position: absolute; padding: 12px 16px; background: white; color: #253449; border-radius: 7px; box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 14px; }
.scene-bubble.left { left: 9%; top: 138px; }
.scene-bubble.right { right: 7%; top: 35px; }
.auth-panel { display: grid; place-items: center; padding: 45px; }
.auth-card { width: min(400px, 100%); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 30px; font-size: 21px; }
.auth-card h2 { font-size: 30px; margin: 0 0 8px; }
.subtle { margin: 0 0 28px; color: var(--muted); }
.segmented { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; background: #f1f4f7; padding: 4px; border-radius: 8px; margin-bottom: 24px; }
.segmented button { min-height: 42px; background: transparent; border-radius: 6px; color: var(--muted); }
.segmented button.active { color: var(--text); background: #fff; box-shadow: 0 2px 8px rgba(16,24,40,.08); font-weight: 600; }
.segmented.compact { margin-bottom: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.field { display: block; }
.field > span { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #475467; margin-bottom: 7px; }
.field > span svg { width: 16px; height: 16px; }
.field input, .form-label input, .form-label textarea { width: 100%; border: 1px solid #d9e0e8; border-radius: 7px; min-height: 46px; padding: 0 13px; outline: 0; background: #fff; }
.field input:focus, .form-label input:focus, .form-label textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,112,239,.1); }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.code-button { height: 46px; border-radius: 7px; padding: 0 13px; background: #edf4ff; color: var(--primary); font-weight: 600; }
.dev-code { color: #475467; font-size: 13px; padding: 8px 10px; background: #f4f6f8; border-radius: 6px; }
.dev-code strong { color: var(--primary); letter-spacing: 2px; margin-left: 6px; }
.auth-switch { display: block; margin: 24px auto 16px; }
.demo-tip { display: flex; justify-content: center; align-items: center; gap: 6px; color: #98a2b3; font-size: 12px; }
.admin-auth-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: #f3f6f9; }
.admin-auth-card { width: min(430px, 100%); padding: 36px; border: 1px solid #e3e8ef; border-radius: 8px; background: #fff; box-shadow: 0 18px 50px rgba(16,24,40,.1); }
.admin-auth-brand { display: flex; align-items: center; gap: 13px; padding-bottom: 26px; border-bottom: 1px solid #edf0f3; }
.admin-auth-brand strong, .admin-auth-brand span { display: block; }.admin-auth-brand strong { font-size: 17px; }.admin-auth-brand span { margin-top: 2px; color: #98a2b3; font-size: 12px; }
.admin-auth-copy { padding: 28px 0 24px; }.admin-auth-copy h1 { margin: 0; font-size: 28px; }.admin-auth-copy p { margin: 7px 0 0; color: #667085; font-size: 14px; }
.admin-auth-note { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #98a2b3; font-size: 12px; }.admin-auth-note svg { width: 15px; height: 15px; }
.auth-orbit { position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.orbit-one { width: 410px; height: 410px; right: -150px; bottom: 100px; }
.orbit-two { width: 230px; height: 230px; right: -60px; bottom: 190px; }

/* Mobile application */
.mobile-shell { min-height: 100vh; display: flex; justify-content: center; background: #dce3e9; }
.phone-surface { width: min(100%, 540px); min-height: 100vh; height: 100vh; background: var(--surface); position: relative; overflow: hidden; box-shadow: 0 0 40px rgba(16,24,40,.12); padding-bottom: 72px; }
.phone-surface.full-page { padding-bottom: 0; }
.topbar { height: 64px; padding: max(8px, env(safe-area-inset-top)) 14px 8px; display: grid; grid-template-columns: 42px 1fr minmax(42px,auto); align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid #eef1f4; position: relative; z-index: 20; }
.topbar > div:nth-child(2) { text-align: center; min-width: 0; }
.topbar h1 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar > div:nth-child(2) > span { display: block; color: var(--green); font-size: 11px; margin-top: 1px; }
.topbar-actions { display: flex; justify-content: flex-end; }
.topbar-spacer { width: 38px; }
.page-body { height: calc(100vh - 136px); overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.full-page .page-body { height: calc(100vh - 64px); }
.padded { padding: 16px; }
.bottom-nav { height: 72px; padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(3,1fr); position: absolute; bottom: 0; left: 0; right: 0; z-index: 20; background: rgba(255,255,255,.97); border-top: 1px solid #eef1f4; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #a3abb5; font-size: 11px; }
.bottom-nav a svg { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--primary); }
.search-box { margin: 12px 16px; height: 40px; border-radius: 6px; background: #f2f4f6; display: flex; align-items: center; padding: 0 11px; gap: 8px; }
.search-box svg { width: 18px; height: 18px; color: #8893a2; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.search-box > button { width: 26px; height: 26px; padding: 3px; background: transparent; color: #98a2b3; }
.plus-menu { position: absolute; z-index: 25; top: 57px; right: 12px; width: 190px; padding: 6px; border-radius: 8px; background: #17212f; box-shadow: 0 14px 35px rgba(16,24,40,.3); }
.plus-menu button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px; color: #fff; background: transparent; border-radius: 5px; text-align: left; }
.plus-menu button:hover { background: rgba(255,255,255,.1); }
.todo-strip { width: 100%; height: 51px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 0 17px; background: #fff; border-bottom: 9px solid #f5f6f7; }
.todo-strip > span { display: flex; align-items: center; gap: 8px; }
.todo-strip svg { width: 18px; color: #64748b; }
.todo-strip b { color: var(--primary); font-size: 13px; text-align: left; }
.todo-strip > svg { color: #98a2b3; }
.conversation-row { width: 100%; height: 76px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; text-align: left; position: relative; }
.conversation-row:hover { background: #f7f9fb; }
.conversation-row::after { content: ''; position: absolute; left: 80px; right: 0; bottom: 0; height: 1px; background: #f0f2f5; }
.conversation-main { min-width: 0; flex: 1; }
.row-title { display: block; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview { display: block; color: #8993a0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { align-self: flex-start; color: #a0a8b2; font-size: 12px; padding-top: 4px; text-align: right; white-space: nowrap; }
.row-meta i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin: 10px 4px 0 auto; }
.result-group { border-bottom: 9px solid #f4f6f8; }
.result-group h3, .contact-groups h3 { margin: 0; background: #f5f6f8; color: #667085; font-size: 12px; font-weight: 500; padding: 7px 16px; }
.result-group > button { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 10px; background: #fff; padding: 8px 16px; border-bottom: 1px solid #eef1f4; text-align: left; }
.result-group > button > span { min-width: 0; flex: 1; }
.result-group b { display: block; }
.result-group small { display: block; color: #8a94a2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-group > button > svg:last-child { margin-left: auto; color: #a8b0ba; }
.empty-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #98a2b3; text-align: center; padding: 35px 20px; }
.empty-state > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #f1f4f7; margin-bottom: 14px; }
.empty-state > span svg { width: 26px; height: 26px; }
.empty-state b { color: #475467; font-size: 15px; }
.empty-state p { margin: 6px 0 0; font-size: 13px; }

/* Tasks and contacts */
.task-add { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.task-add input { min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; outline: 0; }
.task-list { margin: 18px -16px; border-top: 1px solid var(--line); }
.task-row { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.task-row > span { flex: 1; }
.task-row.done > span { color: #98a2b3; text-decoration: line-through; }
.task-check, .select-circle { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #c7ced8; padding: 0; display: grid; place-items: center; background: white; }
.task-row.done .task-check, .selected .select-circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.task-check svg, .select-circle svg { width: 14px; height: 14px; }
.contact-shortcuts { border-bottom: 9px solid #f4f6f8; }
.contact-shortcuts button { width: 100%; height: 58px; padding: 0 16px; display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid #eef1f4; }
.contact-shortcuts button > svg:last-child { margin-left: auto; color: #a8b0ba; }
.shortcut { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: #fff; }
.shortcut.blue { background: var(--primary); }.shortcut.violet { background: #7a5af8; }.shortcut.green { background: #12b76a; }
.contact-row { width: 100%; height: 64px; padding: 8px 16px; display: flex; align-items: center; gap: 12px; background: #fff; text-align: left; border-bottom: 1px solid #f0f2f5; }
.contact-row > span:nth-child(2) { min-width: 0; flex: 1; }
.contact-row b, .contact-row small { display: block; }
.contact-row small { color: #98a2b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.online-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.search-action { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.search-action .search-box { margin: 0; }
.person-card { min-height: 68px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.person-card > span { min-width: 0; flex: 1; }
.person-card b, .person-card small { display: block; }
.person-card small { color: var(--muted); margin-top: 3px; }
.form-label { display: block; font-size: 14px; color: #475467; margin-bottom: 18px; position: relative; }
.form-label input, .form-label textarea { display: block; margin-top: 8px; }
.form-label textarea { height: 150px; padding: 12px; resize: vertical; }
.form-label > small { position: absolute; right: 8px; bottom: 7px; color: #98a2b3; }
.selection-head { display: flex; justify-content: space-between; margin: 20px 0 8px; color: #667085; font-size: 13px; }
.selection-head b { color: var(--primary); }
.select-contacts button { width: 100%; height: 60px; display: flex; align-items: center; gap: 11px; background: #fff; border-bottom: 1px solid var(--line); text-align: left; }
.sticky-action { margin-top: 24px; }
.request-card { min-height: 72px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }.request-card > span { min-width: 0; flex: 1; }.request-card b, .request-card small { display: block; }.request-card small { color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.request-card > div { display: flex; gap: 6px; }.request-card .primary, .request-card .soft { min-height: 34px; padding: 0 11px; font-size: 12px; }.request-card .reject { color: #667085; background: #f2f4f7; }.request-status { color: #98a2b3; font-size: 12px; font-style: normal; }.request-status.accepted { color: var(--green); }.request-status.rejected { color: var(--danger); }

/* Profile and settings */
.me-body { background: #f2f4f6; }
.profile-hero { width: 100%; min-height: 114px; padding: 18px 16px; display: flex; align-items: center; gap: 14px; background: #fff; text-align: left; border-bottom: 9px solid #f2f4f6; }
.profile-hero > span { flex: 1; min-width: 0; }
.profile-hero b { display: block; font-size: 19px; }
.profile-hero small { display: block; color: #8a94a2; margin-top: 5px; }
.profile-hero em { display: flex; align-items: center; gap: 5px; color: var(--green); margin-top: 7px; font-style: normal; font-size: 12px; }
.profile-hero em i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.profile-hero > svg { color: #a6aeb8; }
.menu-section { margin-bottom: 9px; background: #fff; }
.menu-row { width: 100%; height: 57px; display: flex; align-items: center; gap: 11px; padding: 0 16px; background: #fff; border-bottom: 1px solid #edf0f3; text-align: left; }
.menu-row b { flex: 1; font-weight: 500; }
.menu-row small { color: #7c8795; }
.menu-row > svg { color: #a3abb5; }
.menu-icon { color: #475467; display: grid; place-items: center; }
.menu-icon svg { width: 19px; height: 19px; }
.danger-text, .danger-text .menu-icon { color: var(--danger); }
.form-page { background: #f5f6f8; padding-bottom: 28px; }
.avatar-editor { height: 134px; display: flex; align-items: center; justify-content: center; gap: 20px; background: #fff; margin-bottom: 10px; }
.avatar-editor > span { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 13px; cursor: pointer; }
.avatar-editor input, .chat-tools input, .upload-area input { display: none; }
.form-row { min-height: 55px; display: grid; grid-template-columns: 110px 1fr; align-items: center; padding: 8px 16px; border-bottom: 1px solid #edf0f3; background: #fff; }
.form-row > span { color: #667085; font-size: 14px; }
.form-row input, .form-row textarea, .form-row select { border: 0; outline: 0; width: 100%; min-width: 0; background: #fff; text-align: right; }
.form-row textarea { resize: none; min-height: 50px; padding: 7px 0; }
.settings-page { background: #f4f6f8; }
.setting-section { background: #fff; margin-bottom: 9px; padding: 16px; }
.setting-section h3 { font-size: 14px; font-weight: 500; margin: 0 0 13px; }
.status-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.status-options button { min-height: 38px; display: flex; justify-content: center; align-items: center; gap: 6px; background: #f4f6f8; border-radius: 6px; font-size: 13px; }
.status-options button.active { color: var(--primary); background: #edf4ff; outline: 1px solid #84adff; }
.status-options i { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.status-options button:nth-child(1) i { background: var(--green); }.status-options button:nth-child(2) i { background: #f79009; }.status-options button:nth-child(4) i { background: #667085; }
.settings-textarea { width: 100%; min-height: 78px; border: 1px solid var(--line); border-radius: 6px; padding: 10px; resize: vertical; outline: 0; }
.toggle-row { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #f0f2f5; text-align: left; }
.switch { width: 44px; height: 25px; border-radius: 13px; padding: 2px; background: #d6dbe1; transition: .2s; }
.switch i { display: block; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .2s; }
.switch.on { background: var(--primary); }.switch.on i { transform: translateX(19px); }
.radio-group { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-group button { display: flex; align-items: center; gap: 7px; background: transparent; padding: 4px 0; color: #667085; }
.radio-group button > span { width: 20px; height: 20px; border: 1.5px solid #cbd2da; border-radius: 50%; display: grid; place-items: center; }
.radio-group button.active { color: var(--text); }.radio-group button.active > span { background: var(--primary); border-color: var(--primary); color: #fff; }.radio-group svg { width: 13px; height: 13px; }
.privacy-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid #edf0f3; }
.privacy-row select { border: 0; color: #667085; text-align: right; outline: 0; background: white; }
.feedback-page { background: #f8fafb; }
.upload-area { border: 1px dashed #cbd2da; border-radius: 7px; padding: 22px; text-align: center; margin-bottom: 15px; }
.upload-area label { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--primary); cursor: pointer; font-weight: 600; }
.upload-area span { display: block; color: #98a2b3; font-size: 12px; margin-top: 7px; }
.file-preview { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.file-preview > span { display: flex; align-items: center; gap: 8px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; overflow: hidden; }
.file-preview > span svg { width: 16px; }
.file-preview button { margin-left: auto; background: transparent; padding: 0; display: grid; }
.filter-tabs { display: flex; overflow-x: auto; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.filter-tabs button { flex: 0 0 auto; border-radius: 6px; background: #f2f4f7; padding: 7px 12px; color: #667085; }
.filter-tabs button.active { background: var(--primary); color: #fff; }
.favorite-list { padding: 12px; }
.favorite-card { position: relative; padding: 14px 48px 14px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.favorite-card > .icon-button { position: absolute; right: 8px; top: 8px; }
.favorite-type { display: flex; align-items: center; gap: 6px; color: var(--primary); font-size: 12px; }
.favorite-type svg { width: 16px; }
.favorite-card p { margin: 10px 0; line-height: 1.6; overflow-wrap: anywhere; }
.favorite-card > small { color: #98a2b3; }
.favorite-media { display: block; max-width: 220px; max-height: 170px; object-fit: cover; margin: 10px 0; border-radius: 6px; }

/* Chat */
.chat-page { height: 100vh; background: #edf1f4; display: grid; grid-template-rows: 64px 1fr auto auto; position: relative; }
.chat-page .topbar { grid-row: 1; }
.message-stream { min-height: 0; overflow-y: auto; padding: 16px 12px 20px; overscroll-behavior: contain; }
.message-time { width: fit-content; margin: 14px auto; padding: 3px 8px; color: #8b95a2; font-size: 11px; background: rgba(255,255,255,.65); border-radius: 5px; }
.message-line { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0; }
.message-line.own { flex-direction: row-reverse; }
.bubble-wrap { display: flex; align-items: center; gap: 5px; max-width: calc(100% - 70px); position: relative; }
.message-line.own .bubble-wrap { flex-direction: row-reverse; }
.bubble-wrap > small { position: absolute; top: -16px; left: 0; color: #8993a0; font-size: 10px; }
.bubble { max-width: 320px; padding: 10px 13px; background: #fff; border-radius: 4px 8px 8px 8px; line-height: 1.55; font-size: 15px; box-shadow: 0 1px 2px rgba(16,24,40,.05); overflow-wrap: anywhere; }
.own .bubble { background: var(--primary); color: #fff; border-radius: 8px 4px 8px 8px; }
.bubble.image, .bubble.video { padding: 3px; overflow: hidden; }
.bubble img, .bubble video { display: block; max-width: min(260px, 62vw); max-height: 330px; border-radius: 5px; }
.bubble audio { width: min(260px, 60vw); display: block; height: 38px; }
.favorite-action { width: 26px; height: 26px; border-radius: 50%; padding: 5px; display: grid; place-items: center; background: rgba(255,255,255,.75); color: #98a2b3; opacity: 0; transition: opacity .15s; }
.message-line:hover .favorite-action { opacity: 1; }
.favorite-action svg { width: 15px; height: 15px; }
.voice-message { display: flex; align-items: center; gap: 10px; min-width: 90px; }
.file-message { display: flex; align-items: center; gap: 10px; min-width: 190px; color: inherit; }
.file-message svg { width: 30px; height: 30px; }
.file-message span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-message small { display: block; opacity: .7; }
.composer { min-height: 62px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 5px; background: #fff; border-top: 1px solid #dfe4e9; }
.composer textarea { min-width: 0; flex: 1; height: 42px; max-height: 100px; resize: none; border: 0; border-radius: 6px; background: #f2f4f6; padding: 10px 11px; outline: 0; }
.composer .icon-button { flex: 0 0 40px; height: 42px; border-radius: 7px; }
.composer .recording { color: var(--danger); background: #fef3f2; animation: pulse 1.2s infinite; }
.send-button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 7px; }
@keyframes pulse { 50% { opacity: .55; } }
.emoji-panel { display: grid; grid-template-columns: repeat(8,1fr); padding: 12px; gap: 4px; background: #fff; border-top: 1px solid var(--line); }
.emoji-panel button { height: 38px; background: transparent; font-size: 22px; }
.chat-tools { display: grid; grid-template-columns: repeat(4,1fr); padding: 17px 12px 20px; background: #fff; border-top: 1px solid var(--line); }
.chat-tools label, .chat-tools button { display: flex; flex-direction: column; align-items: center; gap: 7px; background: transparent; color: #667085; font-size: 12px; cursor: pointer; }
.chat-tools svg { width: 24px; height: 24px; color: #344054; }
.picker-overlay { position: absolute; inset: 0; z-index: 40; background: rgba(16,24,40,.35); display: flex; align-items: flex-end; }
.picker-sheet { width: 100%; max-height: 60%; overflow-y: auto; border-radius: 8px 8px 0 0; background: #fff; padding-bottom: env(safe-area-inset-bottom); }
.picker-sheet header { height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); }
.picker-sheet > button { width: 100%; min-height: 58px; padding: 10px 16px; display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid var(--line); text-align: left; }
.picker-sheet > button > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Admin */
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; background: #f5f7f9; transition: grid-template-columns .2s; }
.admin-layout.collapsed { grid-template-columns: 76px 1fr; }
.admin-sidebar { height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; background: #101828; color: #fff; overflow: hidden; }
.admin-brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.admin-brand span b, .admin-brand span small { display: block; }.admin-brand span b { font-size: 17px; }.admin-brand span small { font-size: 11px; color: #98a2b3; margin-top: 2px; }
.admin-sidebar nav { flex: 1; padding: 18px 10px; }
.admin-sidebar nav a { height: 46px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border-radius: 6px; color: #aeb8c7; margin-bottom: 5px; white-space: nowrap; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }.admin-sidebar nav a.active { background: #1570ef; color: #fff; }
.admin-user { min-height: 74px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.admin-user > span { min-width: 0; flex: 1; }.admin-user b, .admin-user small { display: block; }.admin-user small { color: #98a2b3; font-size: 11px; margin-top: 2px; }.admin-user button { color: #aeb8c7; background: transparent; padding: 6px; display: grid; }
.collapsed .admin-brand span, .collapsed .admin-sidebar nav span, .collapsed .admin-user > span, .collapsed .admin-user > button { display: none; }
.collapsed .admin-sidebar nav a { justify-content: center; padding: 0; }.collapsed .admin-user { justify-content: center; }
.admin-main { min-width: 0; }
.admin-top { height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: #fff; border-bottom: 1px solid #e7ebf0; }
.admin-top > span { margin-left: auto; display: flex; align-items: center; gap: 7px; color: #667085; font-size: 13px; }.admin-top > span i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.admin-top .soft { min-height: 37px; }
.admin-only-label { display: flex; align-items: center; gap: 7px; color: #344054; font-size: 13px; }.admin-only-label svg { width: 17px; height: 17px; color: var(--primary); }
.admin-page { max-width: 1480px; margin: 0 auto; padding: 32px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 20px; }
.admin-heading h1 { margin: 0; font-size: 26px; }.admin-heading p { margin: 6px 0 0; color: #667085; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.stat-card { min-height: 126px; display: flex; align-items: center; gap: 17px; padding: 22px; background: #fff; border: 1px solid #e7ebf0; border-radius: 8px; }
.stat-card > span { width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; }.stat-card > span svg { width: 25px; height: 25px; }.stat-card small, .stat-card b { display: block; }.stat-card small { color: #667085; }.stat-card b { margin-top: 5px; font-size: 27px; }
.admin-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }.admin-panels section, .admin-form-card { background: #fff; border: 1px solid #e7ebf0; border-radius: 8px; padding: 22px; }.admin-panels h3, .admin-form-card h3 { margin: 0 0 18px; }
.health-list p { display: flex; justify-content: space-between; padding: 13px 0; margin: 0; border-bottom: 1px solid #edf0f3; }.health-list p span { display: flex; align-items: center; gap: 9px; }.health-list p i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }.health-list p b { color: var(--green); font-size: 13px; }
.panel-copy { color: #667085; line-height: 1.8; }
.admin-search { height: 40px; width: 270px; display: flex; align-items: center; gap: 8px; padding: 0 11px; background: #fff; border: 1px solid #d8dee7; border-radius: 7px; }.admin-search svg { color: #98a2b3; }.admin-search input { min-width: 0; flex: 1; border: 0; outline: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e7ebf0; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }th { padding: 13px 16px; text-align: left; color: #667085; font-size: 12px; font-weight: 600; background: #f8fafb; }td { padding: 13px 16px; border-top: 1px solid #edf0f3; font-size: 14px; }.table-user { display: flex; align-items: center; gap: 10px; }
.tag, .status-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; color: #344054; background: #f2f4f7; font-size: 12px; }.tag.admin { color: #6941c6; background: #f4f3ff; }.status-tag { color: #027a48; background: #ecfdf3; }.status-tag.disabled, .status-tag.pending { color: #b54708; background: #fffaeb; }.status-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.feedback-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }.feedback-card { min-height: 170px; padding: 18px; text-align: left; background: #fff; border: 1px solid #e7ebf0; border-radius: 8px; }.feedback-card:hover { border-color: #84adff; }.feedback-card h3 { height: 48px; margin: 14px 0 8px; font-size: 15px; line-height: 1.55; overflow: hidden; }.feedback-card p { color: #667085; margin: 0 0 12px; }.feedback-card small { color: #98a2b3; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; }.admin-form-card .form-row { padding: 8px 0; }.admin-form-card .form-row input, .admin-form-card .form-row select { min-height: 40px; padding: 0 10px; border: 1px solid #d8dee7; border-radius: 6px; text-align: left; }.admin-form-card .soft { margin-top: 16px; }
.logo-uploader { display: flex; align-items: center; gap: 14px; padding: 0 0 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }.logo-uploader img { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; }.logo-uploader label { cursor: pointer; margin: 0 !important; }.logo-uploader input { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.5); }.modal { width: min(530px,100%); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: 0 24px 60px rgba(16,24,40,.25); }.modal > header { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }.modal h2 { font-size: 18px; margin: 0; }.modal-form, .feedback-detail { padding: 20px; }.modal-form .form-row { padding-left: 0; padding-right: 0; }.feedback-detail > p { line-height: 1.8; }.feedback-detail > small { color: #667085; }.feedback-detail img { max-width: 100%; max-height: 220px; object-fit: contain; display: block; margin: 14px 0; border-radius: 6px; }.feedback-detail textarea { width: 100%; min-height: 110px; margin: 18px 0; border: 1px solid #d8dee7; border-radius: 7px; padding: 10px; resize: vertical; }
.toast { position: fixed; z-index: 200; top: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 11px 16px; color: #fff; background: #17212f; border-radius: 7px; box-shadow: 0 12px 35px rgba(16,24,40,.22); font-size: 14px; animation: toast-in .2s ease-out; }.toast.error { background: #b42318; }@keyframes toast-in { from { opacity: 0; transform: translate(-50%,-8px); } }
.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; }.not-found h1 { margin: 22px 0 5px; }.not-found p { color: #667085; }.not-found .primary { margin-top: 16px; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }.auth-visual { display: none; }.auth-panel { min-height: 100vh; padding: 30px 22px; }.mobile-brand { display: flex; }
  .admin-layout { grid-template-columns: 76px 1fr; }.admin-brand span, .admin-sidebar nav span, .admin-user > span, .admin-user > button { display: none; }.admin-sidebar nav a { justify-content: center; padding: 0; }.admin-user { justify-content: center; }.admin-page { padding: 24px; }.stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.feedback-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  body { background: #fff; }.mobile-shell { display: block; background: #fff; }.phone-surface { width: 100%; box-shadow: none; }
  .favorite-action { opacity: .7; }.bubble { max-width: 72vw; }.emoji-panel { grid-template-columns: repeat(8,1fr); }.status-options { grid-template-columns: repeat(2,1fr); }
  .admin-layout, .admin-layout.collapsed { display: block; }.admin-sidebar { height: 64px; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; flex-direction: row; }.admin-brand, .admin-user { display: none; }.admin-sidebar nav { width: 100%; padding: 5px; display: grid; grid-template-columns: repeat(4,1fr); }.admin-sidebar nav a { height: 54px; margin: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 0; font-size: 10px; }.admin-sidebar nav span { display: block; }.admin-main { padding-bottom: 64px; }.admin-top { padding: 0 14px; }.admin-top > span { display: none; }.admin-top .soft { margin-left: auto; }.admin-page { padding: 18px 14px; }.admin-heading { align-items: flex-start; flex-direction: column; }.admin-heading h1 { font-size: 22px; }.admin-search { width: 100%; }.stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.stat-card { padding: 14px; min-height: 102px; }.stat-card > span { display: none; }.stat-card b { font-size: 23px; }.admin-panels, .settings-grid, .feedback-grid { grid-template-columns: 1fr; }.admin-panels section { padding: 17px; }.table-wrap { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; }
}
@media (max-width: 380px) {
  .auth-panel { padding: 22px 16px; }.auth-card h2 { font-size: 26px; }.code-row { grid-template-columns: 1fr; }.code-button { width: 100%; }.emoji-panel { grid-template-columns: repeat(6,1fr); }.composer { gap: 2px; }.composer .icon-button { flex-basis: 36px; }.profile-hero { padding-left: 12px; padding-right: 12px; }.stat-grid { grid-template-columns: 1fr; }
}
