:root { --bg: #edf2f7; --panel: #fff; --ink: #172230; --muted: #8c99a8; --line: #e8edf2; --accent: #f26b4d; --accent-dark: #df5d40; --bubble: #f2f5f8; --shadow: 0 22px 55px rgba(47, 68, 93, .10); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: 'Noto Sans SC', 'DM Sans', sans-serif; font-size: 14px; }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f6f8fb; }.auth-screen.hidden { display: none; }.auth-card { width: min(100%, 380px); padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); text-align: center; }.auth-mark { margin: 0 auto 15px; }.auth-card h1 { font-size: 21px; margin: 0; }.auth-subtitle { color: var(--muted); font-size: 12px; margin: 8px 0 27px; }.auth-card form { text-align: left; display: grid; gap: 14px; }.auth-card label { color: #73808d; font-size: 11px; display: grid; gap: 7px; }.auth-card input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; outline: 0; color: var(--ink); }.auth-card input:focus { border-color: #f2a08b; box-shadow: 0 0 0 3px #fff0eb; }.auth-submit { margin-top: 3px; padding: 10px; border-radius: 8px; background: var(--accent); color: #fff; }.auth-submit:hover { background: var(--accent-dark); }.auth-toggle { margin-top: 18px; color: var(--accent); background: transparent; font-size: 11px; }.auth-error { min-height: 15px; margin: 0; color: #d8564e; font-size: 11px; }.register-only { display: none !important; }.auth-card.registering .register-only { display: grid !important; }
.app-shell { display: none; }
.app-shell.ready { display: grid; }
.app-shell { width: min(1440px, 100%); min-height: 100vh; margin: auto; display: grid; grid-template-columns: 294px minmax(460px, 1fr) 274px; background: var(--panel); box-shadow: var(--shadow); }
.app-shell:not(.ready) { display: none; }
.sidebar { border-right: 1px solid var(--line); padding: 28px 16px 18px; display: flex; flex-direction: column; min-width: 0; }
.brand-row, .profile-card, .section-heading, .chat-header, .details-heading, .composer-bottom, .setting-row { display: flex; align-items: center; }
.brand-row { gap: 10px; padding: 0 10px 25px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: white; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.brand-row strong { font-size: 14px; display: block; }.brand-caption { color: var(--muted); font-size: 10px; display: block; margin-top: 2px; }.brand-row .icon-btn { margin-left: auto; }
.icon-btn, .tiny-btn, .tool-btn { background: transparent; color: #84909f; display: grid; place-items: center; border-radius: 8px; }.icon-btn { width: 34px; height: 34px; font-size: 20px; }.icon-btn:hover, .tiny-btn:hover, .tool-btn:hover { color: var(--accent); background: #fff5f2; }.tiny-btn { font-size: 22px; width: 28px; height: 28px; }
.profile-card { gap: 10px; background: #f8fafc; border-radius: 12px; padding: 12px; margin-bottom: 17px; }.avatar, .header-avatar { flex: 0 0 auto; background: #ffe3d8; color: #a44d35; display: grid; place-items: center; border-radius: 50%; font-weight: 700; }.avatar-blue, .header-avatar.avatar-blue { background: #dce9ff; color: #4a6eaa; }.avatar-green, .header-avatar.avatar-green { background: #d9f1e5; color: #418265; }.avatar-purple, .header-avatar.avatar-purple { background: #eadfff; color: #7755a4; }.avatar-yellow, .header-avatar.avatar-yellow { background: #fff0c8; color: #98752b; }.avatar-orange { background: #ffe3d8; color: #a44d35; }.avatar { width: 40px; height: 40px; }.avatar-large { width: 34px; height: 34px; font-size: 14px; }.profile-copy strong { display: block; font-size: 13px; }.profile-copy span { font-size: 11px; color: #49aa77; }.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #51bf7d; margin-left: auto; }
.search-box { height: 36px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 7px; padding: 0 11px; color: #aab4c0; }.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }.section-heading { justify-content: space-between; color: #a1aab4; font-size: 11px; margin: 23px 10px 8px; text-transform: uppercase; letter-spacing: .05em; }.contact-list { display: grid; gap: 4px; overflow: auto; }.contact { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; }.contact:hover, .contact.active { background: #fff4ef; }.contact .avatar { width: 37px; height: 37px; font-size: 13px; }.contact-copy { min-width: 0; flex: 1; }.contact-copy strong, .contact-copy span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.contact-copy strong { font-size: 12px; }.contact-copy span { color: var(--muted); font-size: 11px; margin-top: 2px; }.contact-meta { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; color: #bbc3cc; font-size: 10px; }.unread { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: white; display: grid; place-items: center; }.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 9px 0; color: #aab3bf; font-size: 11px; display: flex; gap: 8px; align-items: center; }.shield { color: #63b78e; font-size: 17px; }
.chat-panel { display: grid; grid-template-rows: 78px 43px 1fr auto; min-width: 0; background: #fbfcfd; }.chat-header { padding: 0 26px; border-bottom: 1px solid var(--line); gap: 12px; background: #fff; }.header-avatar { width: 38px; height: 38px; font-size: 14px; background: #dce9ff; color: #4a6eaa; }.header-copy { flex: 1; min-width: 0; }.header-copy h1 { font-size: 15px; margin: 0; font-weight: 700; }.header-copy p { color: #a0a9b2; font-size: 11px; margin: 4px 0 0; }.header-actions { display: flex; gap: 4px; }.mobile-menu { display: none; }.retention-banner { display: flex; align-items: center; justify-content: center; gap: 8px; border-bottom: 1px solid var(--line); color: #a18f88; background: #fffaf8; font-size: 11px; }.banner-icon { color: var(--accent); font-size: 15px; }.retention-banner button { color: var(--accent); background: transparent; font-size: 11px; text-decoration: underline; }
.messages { padding: 24px max(5%, 34px); overflow-y: auto; display: flex; flex-direction: column; gap: 17px; }.day-divider { display: flex; align-items: center; gap: 13px; color: #b0bac5; font-size: 10px; margin: 4px 0 3px; }.day-divider::before, .day-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }.message-row { display: flex; gap: 9px; align-items: flex-end; max-width: 77%; }.message-row.mine { margin-left: auto; flex-direction: row-reverse; }.message-row .avatar { width: 28px; height: 28px; font-size: 10px; }.message-body { min-width: 0; }.message-meta { display: flex; align-items: baseline; gap: 7px; margin: 0 0 4px 2px; }.mine .message-meta { justify-content: flex-end; margin: 0 2px 4px 0; }.message-meta strong { font-size: 11px; }.message-meta time { color: #b0bac4; font-size: 10px; }.bubble { border-radius: 4px 14px 14px 14px; background: var(--bubble); padding: 10px 13px; color: #394652; line-height: 1.55; word-break: break-word; }.mine .bubble { background: var(--accent); color: white; border-radius: 14px 4px 14px 14px; }.media-message { padding: 0; overflow: hidden; background: transparent; }.media-message img, .media-message video { display: block; max-width: min(300px, 100%); max-height: 280px; border-radius: 12px; object-fit: cover; }.file-caption { font-size: 10px; color: #9da8b3; margin-top: 5px; }.mine .file-caption { text-align: right; }.empty-state { margin: auto; text-align: center; color: #aeb8c3; }.empty-state strong { color: #6f7b86; display: block; font-size: 14px; margin-bottom: 4px; }
.composer-wrap { border-top: 1px solid var(--line); padding: 12px 26px 19px; background: #fff; }.composer-tools { display: flex; gap: 2px; }.tool-btn { font-size: 20px; width: 30px; height: 30px; }.composer-wrap textarea { display: block; width: 100%; resize: none; max-height: 100px; border: 0; outline: 0; padding: 6px 0 9px; line-height: 1.5; color: var(--ink); background: transparent; }.composer-wrap textarea::placeholder { color: #bcc5ce; }.composer-bottom { justify-content: space-between; }.helper-text { color: #b6bec7; font-size: 10px; }.send-btn { background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 12px; }.send-btn:hover { background: var(--accent-dark); }.send-btn span { margin-left: 4px; opacity: .75; }
.details-panel { border-left: 1px solid var(--line); padding: 25px 20px; background: #fff; }.details-heading { justify-content: space-between; font-size: 12px; font-weight: 600; }.details-heading .icon-btn { font-size: 21px; }.details-profile { text-align: center; padding: 25px 0 24px; border-bottom: 1px solid var(--line); }.avatar-xlarge { width: 64px; height: 64px; margin: auto; font-size: 21px; }.details-profile h2 { font-size: 15px; margin: 12px 0 3px; }.details-profile p { color: var(--muted); font-size: 11px; margin: 0 0 9px; }.presence-pill { color: #4eae79; background: #effaf3; border-radius: 10px; display: inline-flex; padding: 4px 8px; gap: 5px; font-size: 10px; }.presence-pill span { width: 5px; height: 5px; background: #52bd7e; border-radius: 50%; margin-top: 4px; }.detail-block { padding: 20px 0; border-bottom: 1px solid var(--line); }.detail-block h3 { font-size: 11px; margin: 0 0 12px; color: #82909e; font-weight: 600; }.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; min-height: 62px; }.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }.empty-media { grid-column: 1 / -1; color: #b3bdc7; font-size: 10px; line-height: 1.55; text-align: center; padding-top: 9px; }.setting-row { justify-content: space-between; margin: 14px 0; }.setting-row span { display: grid; gap: 3px; }.setting-row b { font-size: 11px; font-weight: 500; }.setting-row small { font-size: 10px; color: #a8b1ba; }.setting-row input { appearance: none; width: 31px; height: 17px; background: #d9dfe5; border-radius: 10px; position: relative; cursor: pointer; }.setting-row input::after { content: ''; width: 13px; height: 13px; background: #fff; border-radius: 50%; position: absolute; left: 2px; top: 2px; transition: .2s; }.setting-row input:checked { background: #70c995; }.setting-row input:checked::after { left: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 18px); background: #263441; color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1000px) { .app-shell { grid-template-columns: 245px minmax(0, 1fr); }.details-panel { display: none; } }
@media (max-width: 640px) { .app-shell { display: block; }.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; width: 270px; transform: translateX(-102%); transition: .25s; box-shadow: 10px 0 30px rgba(0,0,0,.1); }.sidebar.open { transform: translateX(0); }.chat-panel { min-height: 100vh; }.chat-header { padding: 0 15px; }.mobile-menu { display: block; }.messages { padding: 18px 13px; }.message-row { max-width: 90%; }.composer-wrap { padding: 10px 14px 15px; }.helper-text { display: none; }.send-btn { padding: 8px 12px; } }
.empty-contacts { color: #9ca8b4; text-align: center; font-size: 11px; line-height: 1.7; padding: 28px 10px; }
