.page h1{margin-top:0}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#213547;background-color:#f5f7fb}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:calc(var(--vh, 1vh) * 100);overflow-x:hidden}#root{min-height:calc(var(--vh, 1vh) * 100)}.app-splash{min-height:calc(var(--vh, 1vh) * 100);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem;background:#f5f7fb}.app-splash-logo{margin:0;font-size:1.75rem;color:#213547}.app-splash-spinner{width:40px;height:40px;border:3px solid #e2e8f0;border-top-color:#2563eb;border-radius:50%;animation:app-splash-spin .8s linear infinite}@keyframes app-splash-spin{to{transform:rotate(360deg)}}.page{max-width:720px;margin:0 auto;padding:2rem 1.5rem}.auth-page{min-height:calc(var(--vh, 1vh) * 100);display:flex;align-items:center;justify-content:center;padding:1.5rem}.auth-card{width:100%;max-width:420px;background:#fff;border:1px solid #dbe3f0;border-radius:12px;padding:2rem;box-shadow:0 8px 24px #0f172a14}.auth-card h1{margin:0 0 .5rem;font-size:1.75rem}.auth-subtitle{margin:0 0 1.5rem;color:#64748b}.auth-form{display:flex;flex-direction:column;gap:1rem}.field{display:flex;flex-direction:column;gap:.375rem;font-size:.95rem}.field input{border:1px solid #cbd5e1;border-radius:8px;padding:.75rem .875rem;font:inherit}.field input:focus{outline:2px solid #93c5fd;border-color:#60a5fa}.primary-button,.secondary-button,.link-button{font:inherit}.primary-button{border:none;border-radius:8px;padding:.75rem 1rem;background:#2563eb;color:#fff;cursor:pointer}.primary-button:disabled{opacity:.7;cursor:not-allowed}.secondary-button{border:1px solid #cbd5e1;border-radius:8px;padding:.625rem 1rem;background:#fff;cursor:pointer}.link-button{border:none;background:none;color:#2563eb;cursor:pointer;padding:0}.form-error{margin:0;color:#dc2626;font-size:.95rem}.auth-switch{margin:1.25rem 0 0}.auth-hint{margin:1rem 0 0;color:#64748b;font-size:.875rem}.home-page{display:flex;flex-direction:column;height:calc(var(--vh, 1vh) * 100);max-width:720px;margin:0 auto;padding:1.5rem;overflow:hidden}.home-page-top{flex-shrink:0}.home-chat-list-scroll{flex:1;min-height:0;overflow-y:auto;margin-top:.5rem}.home-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.5rem}.home-header h1{margin:0}.home-subtitle{margin:.25rem 0 0;color:#64748b}.home-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}.selected-members{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.selected-members li{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem .75rem;border-radius:8px;background:#eff6ff;font-size:.9rem}.modal-submit{width:100%;margin-top:1rem}.home-placeholder{padding:1rem;border:1px dashed #cbd5e1;border-radius:8px;background:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;padding:1rem;z-index:1000}.modal-card{width:100%;max-width:480px;background:#fff;border:1px solid #dbe3f0;border-radius:12px;padding:1.5rem;box-shadow:0 12px 32px #0f172a2e}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.modal-header h2{margin:0;font-size:1.25rem}.icon-button{border:none;background:none;font-size:1.5rem;line-height:1;cursor:pointer;color:#64748b}.modal-hint{margin:.75rem 0 0;color:#64748b;font-size:.9rem}.search-results{list-style:none;margin:1rem 0 0;padding:0;display:flex;flex-direction:column;gap:.5rem}.search-result-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc}.search-result-item .primary-button{padding:.5rem .75rem;font-size:.875rem;white-space:nowrap}.chat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.chat-item-link{text-decoration:none;color:inherit;display:block}.chat-item-link:hover .chat-item{border-color:#93c5fd;background:#f8fbff}.chat-item{display:flex;align-items:flex-start;gap:.875rem;padding:.875rem;border:1px solid #e2e8f0;border-radius:12px;background:#fff;position:relative}.chat-avatar{width:44px;height:44px;border-radius:50%;background:#dbeafe;color:#1d4ed8;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.875rem;flex-shrink:0}.chat-item-body{flex:1;min-width:0}.chat-item-top,.chat-item-bottom{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chat-item-top{margin-bottom:.25rem}.chat-item-name{margin:0;font-size:1rem;font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-item-time{color:#64748b;font-size:.8rem;white-space:nowrap}.chat-item-preview{margin:0;color:#64748b;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.chat-unread-badge{min-width:1.5rem;height:1.5rem;padding:0 .4rem;border-radius:999px;background:#2563eb;color:#fff;font-size:.75rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center}.chat-online-dot{position:absolute;left:2.75rem;top:2.75rem;width:10px;height:10px;border-radius:50%;background:#22c55e;border:2px solid #ffffff}.chat-list-empty{padding:1.5rem;border:1px dashed #cbd5e1;border-radius:8px;background:#fff;text-align:center;color:#64748b}.chat-list-skeleton{display:flex;flex-direction:column;gap:.5rem}.skeleton-row{height:72px;border-radius:12px;background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:skeleton-shimmer 1.2s ease-in-out infinite}@keyframes skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.chat-page{display:flex;flex-direction:column;height:calc(var(--vh, 1vh) * 100);max-width:720px;margin:0 auto;background:#f5f7fb;overflow:hidden}.chat-page-body{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}.chat-window-header{display:flex;align-items:center;gap:.75rem;padding:1rem 1.25rem;background:#fff;border-bottom:1px solid #e2e8f0;flex-shrink:0;min-width:0}.back-link{color:#2563eb;text-decoration:none;font-size:1.25rem;line-height:1}.chat-window-title{flex:1;min-width:0;overflow:hidden}.chat-window-title h1{margin:0;font-size:1.1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-window-status{margin:.15rem 0 0;color:#64748b;font-size:.8rem}.chat-window-status--online{color:#16a34a}.message-list{flex:1;min-height:0;overflow-y:auto;padding:1rem 1.25rem;display:flex;flex-direction:column;gap:.75rem}.message-list-loading,.message-list-empty{justify-content:center;align-items:center;color:#64748b}.message-unread-divider{display:flex;align-items:center;gap:.75rem;margin:.5rem 0;color:#64748b;font-size:.8rem;flex-shrink:0}.message-unread-divider:before,.message-unread-divider:after{content:"";flex:1;height:1px;background:#e2e8f0}.message-skeleton{width:60%;height:48px}.message-item{max-width:75%;padding:.75rem .875rem;border-radius:12px;display:flex;flex-direction:column;gap:.25rem}.message-item-incoming{align-self:flex-start;background:#e2e8f0;color:#0f172a}.message-item-outgoing{align-self:flex-end;background:#2563eb;color:#fff}.message-content{margin:0;white-space:pre-wrap;word-break:break-word}.message-list-container{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.message-floating-date{position:absolute;top:10px;left:50%;transform:translate(-50%);z-index:2;padding:4px 12px;border-radius:12px;background:#00000080;color:#fff;font-size:12px;line-height:1.4;pointer-events:none;opacity:0}.message-floating-date--show{animation:message-floating-date-in .15s ease forwards}.message-floating-date--hide{animation:message-floating-date-out .3s ease forwards}@keyframes message-floating-date-in{0%{opacity:0}to{opacity:1}}@keyframes message-floating-date-out{0%{opacity:1}to{opacity:0}}.message-date-anchor{height:1px;width:100%;flex-shrink:0;pointer-events:none}.message-meta{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:4px;align-self:flex-end}.message-time{font-size:10px;line-height:1.2;color:#64748b}.message-item-outgoing .message-time{color:#ffffffbf}.message-read-status{font-size:12px;line-height:1}.message-read-status--sent{color:#94a3b8}.message-item-outgoing .message-read-status--sent{color:#ffffffb3}.message-read-status--read{color:#2563eb}.message-item-outgoing .message-read-status--read{color:#93c5fd}.message-composer{padding:.875rem 1.25rem max(1.25rem,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e2e8f0;flex-shrink:0;position:sticky;bottom:0;z-index:5}.composer-reply-preview{margin-bottom:.75rem;padding:.625rem .75rem;border-left:3px solid #2563eb;border-radius:8px;background:#f1f5f9}.composer-reply-preview-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.5rem}.composer-reply-preview-title{margin:0;font-size:.85rem;font-weight:600;color:#2563eb}.composer-reply-clear-all{font-size:.8rem}.composer-reply-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.375rem;max-height:120px;overflow-y:auto}.composer-reply-list-item{display:flex;align-items:flex-start;gap:.5rem;padding:.375rem .5rem;border-radius:6px;background:#fff;border:1px solid #e2e8f0}.composer-reply-list-body,.composer-reply-preview-body{flex:1;min-width:0}.composer-reply-preview-author{margin:0 0 .15rem;font-size:.8rem;font-weight:600;color:#2563eb}.composer-reply-preview-text{margin:0;font-size:.85rem;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer-reply-cancel{font-size:1.25rem;flex-shrink:0}.message-item-replyable{cursor:pointer;position:relative}.message-item-replyable:hover{filter:brightness(.97)}.message-item-selected{outline:2px solid #2563eb;outline-offset:2px;box-shadow:0 0 0 4px #2563eb26}.message-item-outgoing.message-item-selected{outline-color:#fff;box-shadow:0 0 0 4px #ffffff40}.message-selected-badge{position:absolute;top:-.35rem;right:-.35rem;width:1.25rem;height:1.25rem;border-radius:999px;background:#2563eb;color:#fff;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid #ffffff}.message-replies{display:flex;flex-direction:column;gap:.25rem;margin-bottom:.35rem}.message-reply{padding:.35rem .5rem;border-left:3px solid #64748b;border-radius:6px;background:#0f172a0f}.message-item-outgoing .message-reply{border-left-color:#ffffffb3;background:#ffffff26}.message-reply-author{margin:0 0 .1rem;font-size:.72rem;font-weight:600;opacity:.9}.message-reply-text{margin:0;font-size:.8rem;opacity:.85;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}.composer-error{margin:0 0 .5rem}.composer-row{display:flex;gap:.5rem;min-width:0}.composer-input{flex:1;min-width:0;border:1px solid #cbd5e1;border-radius:8px;padding:.75rem .875rem;font:inherit}.composer-input:focus{outline:2px solid #93c5fd;border-color:#60a5fa}.message-sender{margin:0 0 .2rem;font-size:.75rem;font-weight:600;color:#475569}.invites-panel{margin-bottom:1.25rem;padding:1rem;border:1px solid #dbeafe;border-radius:12px;background:#eff6ff}.invites-title{margin:0 0 .75rem;font-size:1rem}.invites-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.75rem}.invite-item{padding:.75rem;border-radius:8px;background:#fff;border:1px solid #e2e8f0}.invite-text{margin:0 0 .75rem}.invite-actions{display:flex;gap:.5rem}.modal-success{margin:0;color:#16a34a;font-size:.9rem}.toast-container{position:fixed;top:1rem;right:1rem;z-index:1000;display:flex;flex-direction:column;gap:.5rem;max-width:320px}.toast{padding:.75rem 1rem;border-radius:8px;background:#1e293b;color:#fff;font-size:.9rem;box-shadow:0 4px 12px #0f172a33;border:none;text-align:left;font:inherit}.toast-clickable{cursor:pointer;width:100%}.toast-clickable:hover{background:#334155}.blocked-banner{margin:0;padding:.75rem 1.25rem;background:#fef2f2;color:#b91c1c;border-bottom:1px solid #fecaca;font-size:.9rem}.chat-header-actions{display:flex;align-items:center;gap:.25rem;margin-left:auto}.notification-toggle{font-size:1.1rem;line-height:1}.chat-menu{position:relative}.chat-menu-dropdown{position:absolute;right:0;top:100%;margin-top:.25rem;min-width:180px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 12px #0f172a1a;z-index:10;display:flex;flex-direction:column;padding:.25rem}.chat-menu-item{border:none;background:none;text-align:left;padding:.5rem .75rem;font:inherit;cursor:pointer;border-radius:6px}.chat-menu-item:hover{background:#f1f5f9}.chat-menu-item-danger{color:#b91c1c}.chat-members-link{margin:.15rem 0 0;padding:0;font-size:.8rem}.chat-action-error{margin:0;padding:.5rem 1.25rem;color:#b91c1c;font-size:.85rem}.members-list{list-style:none;margin:0;padding:0}.members-list-item{padding:.5rem 0;border-bottom:1px solid #f1f5f9}.members-list-item:last-child{border-bottom:none}.members-add-title{margin:1.25rem 0 .75rem;font-size:1rem}.confirm-dialog{max-width:400px}.confirm-message{margin:0 0 1.25rem;color:#475569;line-height:1.5}.confirm-actions{display:flex;justify-content:flex-end;gap:.5rem}.confirm-danger{background:#dc2626}.confirm-danger:hover{background:#b91c1c}.auth-forgot{margin:.75rem 0 0}.home-header-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.home-danger-button{color:#b91c1c;border-color:#fecaca}.admin-page h1{margin-top:0}.admin-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.5rem}.admin-back-link{text-decoration:none;display:inline-flex;align-items:center}.admin-table-wrap{overflow-x:auto;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.admin-table{width:100%;border-collapse:collapse;font-size:.9rem}.admin-table th,.admin-table td{padding:.75rem 1rem;text-align:left;border-bottom:1px solid #f1f5f9}.admin-table th{background:#f8fafc;font-weight:600}.admin-delete-link{color:#dc2626}.composer-attach-button{padding:.625rem .75rem;line-height:1}.message-image-button{border:none;padding:0;background:none;cursor:pointer;border-radius:8px;overflow:hidden}.message-image{display:block;max-width:240px;max-height:240px;object-fit:cover;border-radius:8px}.lightbox-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;background:#0f172ad9;display:flex;align-items:center;justify-content:center;padding:1.5rem}.lightbox-image{max-width:min(100%,960px);max-height:calc(var(--vh, 1vh) * 90);object-fit:contain;border-radius:8px}.lightbox-close{position:absolute;top:1rem;right:1rem;border:none;background:#ffffff26;color:#fff;font-size:2rem;line-height:1;width:2.5rem;height:2.5rem;border-radius:999px;cursor:pointer}.message-context-menu{position:fixed;z-index:1500;width:168px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 16px #0000001f;padding:.25rem}.message-context-menu-item{width:100%;border:none;background:none;display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font:inherit;color:#0f172a;border-radius:6px;cursor:pointer}.message-context-menu-item:hover{background:#f1f5f9}.message-context-menu-icon{width:16px;font-size:16px;line-height:1}.copy-toast{position:fixed;left:50%;bottom:max(1.5rem,env(safe-area-inset-bottom));transform:translate(-50%);z-index:1600;padding:.625rem 1rem;border-radius:8px;background:#1e293b;color:#fff;font-size:.9rem;opacity:0;pointer-events:none}.copy-toast--show{animation:copy-toast-in .15s ease forwards}.copy-toast--hide{animation:copy-toast-out .3s ease forwards}@keyframes copy-toast-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes copy-toast-out{0%{opacity:1;transform:translate(-50%) translateY(0)}to{opacity:0;transform:translate(-50%) translateY(8px)}}.typing-indicator{height:24px;flex-shrink:0;display:flex;align-items:center;gap:.35rem;padding:0 1.25rem;font-size:13px;color:#64748b;opacity:0;transition:opacity .15s ease;overflow:hidden}.typing-indicator--visible{opacity:1}.typing-indicator-dots{display:inline-flex;gap:3px}.typing-indicator-dots span{width:4px;height:4px;border-radius:50%;background:#64748b;animation:typing-dot-bounce 1.2s ease-in-out infinite}.typing-indicator-dots span:nth-child(2){animation-delay:.15s}.typing-indicator-dots span:nth-child(3){animation-delay:.3s}@keyframes typing-dot-bounce{0%,80%,to{transform:translateY(0);opacity:.5}40%{transform:translateY(-3px);opacity:1}}@media(max-width:768px){.page,.chat-page,.home-page{max-width:none;width:100%}.home-page{padding:1rem;padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}.home-header{flex-direction:column;align-items:stretch;gap:.75rem;margin-bottom:1rem}.home-header-actions{width:100%}.home-header-actions .secondary-button{flex:1 1 auto;min-width:0;padding:.625rem .75rem;font-size:.875rem}.home-actions{flex-direction:column}.home-actions .primary-button,.home-actions .secondary-button{width:100%}.chat-page{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.chat-window-header{padding:.75rem 1rem;gap:.5rem}.chat-avatar{width:40px;height:40px;font-size:.8rem;flex-shrink:0}.chat-header-actions{flex-shrink:0}.message-list{padding:.75rem 1rem}.message-composer{padding:.75rem 1rem max(.75rem,env(safe-area-inset-bottom))}.composer-row .primary-button{flex-shrink:0;padding:.75rem .875rem;font-size:.875rem}.composer-attach-button{flex-shrink:0;padding:.625rem}.message-item{max-width:85%}.message-image{max-width:min(240px,100%)}.modal-backdrop{padding:1rem;padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}.modal-card{max-height:calc(var(--vh, 1vh) * 90);overflow-y:auto}.toast-container{left:max(1rem,env(safe-area-inset-left));right:max(1rem,env(safe-area-inset-right))}}code{font-family:Consolas,Monaco,Courier New,monospace}
