*{box-sizing:border-box}html,body,#root{min-height:100%;margin:0}body{color:#172033;background:#eef1f8;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer}.auth-page{background:radial-gradient(circle at 20% 20%,#4f6df529,#0000 30%),radial-gradient(circle at 80% 80%,#6366f11a,#0000 30%),#eef1f8;justify-content:center;align-items:center;min-height:100vh;padding:24px;display:flex}.auth-card{background:#fffffff5;border:1px solid #e0e4ed;border-radius:20px;width:100%;max-width:430px;padding:38px;position:relative;overflow:hidden;box-shadow:0 25px 60px #1f29411a}.auth-card:before{content:"";background:linear-gradient(90deg,#4f6df5,#7c8ff7,#4f6df5);width:100%;height:4px;position:absolute;top:0;left:0}.auth-card h1{letter-spacing:-.8px;margin:0 0 8px;font-size:30px;font-weight:800}.auth-subtitle{color:#737d90;margin:0 0 28px}.auth-form{flex-direction:column;gap:15px;display:flex}.auth-form input{background:#f9fafc;border:1px solid #d9dee8;border-radius:10px;outline:none;width:100%;padding:13px 14px;transition:border-color .15s,background .15s,box-shadow .15s}.auth-form input:focus{background:#fff;border-color:#7085ee;box-shadow:0 0 0 4px #4f6df514}.auth-button{color:#fff;background:linear-gradient(135deg,#6178f5,#4f6df5);border:0;border-radius:10px;width:100%;padding:13px;font-weight:700;box-shadow:0 7px 15px #4f6df533}.auth-button:hover{background:#405de0}.auth-button:disabled{opacity:.65;cursor:not-allowed}.auth-error{color:#c62828;background:#fff3f3;border:1px solid #ffdada;border-radius:9px;margin:0;padding:10px 12px;font-size:14px}.auth-footer{text-align:center;color:#697386;margin:22px 0 0}.auth-footer a{color:#4f6df5;font-weight:700;text-decoration:none}.auth-footer a:hover{text-decoration:underline}.sidebar{-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);background:#ffffffe0;border:1px solid #fffc;border-radius:20px;flex-direction:column;width:290px;height:calc(100vh - 40px);display:flex;overflow:hidden;box-shadow:0 15px 40px #17203314}.sidebar-header{padding:24px 20px 18px}.sidebar-header h2{color:#172033;margin:0 0 18px;font-size:1.35rem}.sidebar-search{box-sizing:border-box;color:#172033;background:#f8f9fc;border:1px solid #e5e7eb;border-radius:12px;outline:none;width:100%;padding:12px 14px;font-size:.95rem;transition:border-color .2s,box-shadow .2s}.sidebar-search:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f11f}.user-list{flex:1;padding:4px 10px 14px;overflow-y:auto}.user-button{text-align:left;cursor:pointer;background:0 0;border:none;border-radius:14px;align-items:center;gap:12px;width:100%;margin-bottom:4px;padding:12px;transition:background .2s,transform .2s;display:flex}.user-button:hover{background:#f1f3f9}.user-button--active{background:#eef0ff}.user-avatar,.chat-user-avatar{color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:42px;height:42px;font-weight:700;display:flex}.user-name{flex-direction:column;gap:3px;min-width:0;display:flex}.user-name strong{color:#172033;white-space:nowrap;text-overflow:ellipsis;font-size:.94rem;overflow:hidden}.user-name span{color:#8a93a5;white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;overflow:hidden}.sidebar-message{color:#8a93a5;text-align:center;margin:20px;font-size:.9rem}@media (width<=700px){.sidebar{width:100%;height:100dvh;box-shadow:none;background:#f8f9fc;border:none;border-radius:0}.sidebar-header{padding:max(24px, env(safe-area-inset-top)) 20px 16px;background:#fff;border-bottom:1px solid #e9ebf1}.sidebar-header h2{margin-bottom:16px;font-size:1.5rem}.sidebar-search{background:#f1f3f8;border-radius:14px;height:46px}.user-list{padding:10px 12px 20px}.user-button{background:#fff;border-radius:15px;min-height:68px;margin-bottom:5px;padding:12px}.user-button:active{transform:scale(.98)}.user-button--active{background:#eef0ff}.user-avatar{width:46px;height:46px;font-size:1rem}}.chat{background:#fff;border-radius:20px;flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden;box-shadow:0 15px 40px #17203314}.chat-header{color:#fff;background:linear-gradient(135deg,#6366f1,#7c3aed);align-items:center;gap:12px;min-height:72px;padding:12px 20px;display:flex}.chat-header h2{margin:0;font-size:1rem}.chat-user-info{flex-direction:column;gap:3px;display:flex}.chat-user-info span{color:#ffffffb8;font-size:.78rem}.chat-user-avatar{color:#6366f1;background:#fff;width:40px;height:40px}.chat-back-button{color:#fff;cursor:pointer;background:0 0;border:none;padding:5px;font-size:1.8rem;line-height:1;display:none}.chat-status{color:#8a93a5;margin:10px 20px;font-size:.85rem}.chat-error{color:#b42318;background:#fff0ee;border-radius:10px;margin:10px 20px;padding:10px 12px;font-size:.85rem}.messages{background:#f8f9fc;flex-direction:column;flex:1;gap:10px;min-height:0;padding:20px;display:flex;overflow-y:auto}.message{border-radius:16px;max-width:70%;padding:11px 14px;line-height:1.4;box-shadow:0 3px 10px #1720330a}.message p{margin:0}.message--mine{color:#fff;background:linear-gradient(135deg,#6366f1,#7c3aed);border-bottom-right-radius:5px;align-self:flex-end}.message--received{color:#172033;background:#fff;border-bottom-left-radius:5px;align-self:flex-start}.message-form{background:#fff;border-top:1px solid #e9ebf1;gap:10px;padding:14px;display:flex}.message-form input{border:1px solid #e1e4eb;border-radius:12px;outline:none;flex:1;min-width:0;padding:12px 14px}.message-form input:focus{border-color:#6366f1}.message-form button{color:#fff;cursor:pointer;background:#6366f1;border:none;border-radius:12px;padding:0 18px;font-weight:600}.message-form button:disabled{opacity:.55;cursor:not-allowed}.empty-chat{text-align:center;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:30px;display:flex}.empty-chat-icon{margin-bottom:12px;font-size:3rem}.empty-chat h2{color:#172033;margin:0 0 8px}.empty-chat p{color:#8a93a5;max-width:320px;margin:0}@media (width<=700px){.chat{width:100%;height:100dvh;box-shadow:none;border-radius:0}.chat-header{min-height:64px;padding:max(8px, env(safe-area-inset-top)) 14px 8px}.chat-back-button{display:block}.chat-user-avatar{width:38px;height:38px}.messages{padding:14px}.message{max-width:82%}.message-form{padding:10px 12px max(10px, env(safe-area-inset-bottom))}.message-form input{min-height:44px}.message-form button{min-width:64px;padding:0 12px}.empty-chat{display:none}}.home-page{background:radial-gradient(circle at 0 0,#6366f11f,#0000 35%),#eef1f8;gap:20px;max-height:100vh;padding:20px;display:flex}.mobile-view{flex-shrink:0}.home-main{flex-direction:column;flex:1;gap:20px;min-width:0;display:flex}.home-header{-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);background:#ffffffbf;border:1px solid #fffc;border-radius:18px;justify-content:space-between;align-items:center;min-height:76px;padding:16px 24px;display:flex;box-shadow:0 10px 30px #1720330f}.home-header h1{color:#172033;margin:0;font-size:1.35rem}.home-header-actions{align-items:center;gap:10px;display:flex}.profile-button,.logout-button{cursor:pointer;border:none;border-radius:10px;padding:10px 16px;font-size:.9rem;font-weight:600;text-decoration:none;transition:transform .2s,box-shadow .2s}.profile-button{color:#fff;background:#6366f1}.logout-button{color:#374151;background:#e5e7eb}.profile-button:hover,.logout-button:hover{transform:translateY(-1px)}.home-content{flex:1;min-height:0}@media (width<=700px){.home-page{background:#eef1f8;min-height:100dvh;padding:0;display:block}.mobile-view{width:100%;min-height:100dvh;display:none}.mobile-view--active{display:block}.home-main{gap:0;width:100%;min-height:100dvh;display:none}.home-main--mobile-active{display:flex}.home-header{display:none}.home-content{width:100%;height:100dvh}}.profile{background:#fff;border:1px solid #e1e5ed;border-radius:18px;width:100%;max-width:560px;margin:30px auto;padding:30px;box-shadow:0 12px 35px #1f294112}.profile h2{letter-spacing:-.4px;margin:0 0 26px;font-size:24px}.profile-form{flex-direction:column;gap:18px;display:flex}.profile-field{flex-direction:column;gap:7px;display:flex}.profile-field label{color:#3c4557;font-size:13px;font-weight:700}.profile-field input,.profile-field textarea{color:#172033;resize:vertical;background:#f9fafc;border:1px solid #dce1ea;border-radius:10px;outline:none;width:100%;padding:12px 13px;transition:border-color .15s,background .15s,box-shadow .15s}.profile-field input:focus,.profile-field textarea:focus{background:#fff;border-color:#7187ef;box-shadow:0 0 0 4px #4f6df514}.profile-field textarea{min-height:110px}.profile-save{color:#fff;background:linear-gradient(135deg,#6178f5,#4f6df5);border:0;border-radius:10px;align-self:flex-start;padding:11px 21px;font-weight:700;box-shadow:0 5px 12px #4f6df529}.profile-save:hover{background:#405de0}.profile-save:disabled{opacity:.6;cursor:not-allowed}.profile-error,.profile-success{border-radius:10px;padding:11px 13px;font-size:13px}.profile-error{color:#c62828;background:#fff2f2;border:1px solid #ffdada}.profile-success{color:#247a38;background:#effaf1;border:1px solid #d5f0d9}.profile-back{color:#4f6df5;margin-top:22px;font-size:14px;font-weight:600;text-decoration:none;display:inline-flex}.profile-back:hover{text-decoration:underline}
