*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

.gradient-primary { background: linear-gradient(135deg, #10B981, #059669); }
.text-gradient { background: linear-gradient(135deg, #10B981, #059669); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.btn-primary {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white; border: none; padding: 0.625rem 1.25rem;
    border-radius: 0.5rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: #FFFFFF; color: #475569; border: 1px solid #E2E8F0;
    padding: 0.625rem 1.25rem; border-radius: 0.5rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s ease;
}
.btn-secondary:hover { background: #F8FAFC; border-color: #CBD5E1; }

.btn-danger { background: #EF4444; color: white; border: none; padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; }
.btn-danger:hover { background: #DC2626; }

.input-field {
    width: 100%; padding: 0.625rem 0.875rem; border: 1px solid #E2E8F0;
    border-radius: 0.5rem; font-size: 0.875rem; color: #0F172A;
    background: #FFFFFF; transition: border-color 0.2s;
}
.input-field:focus { outline: none; border-color: #10B981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.input-field::placeholder { color: #94A3B8; }

.card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 0.75rem; }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #E2E8F0; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #475569; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }

.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #10B981; border: 2px solid white; position: absolute; bottom: 0; right: 0; }

.skeleton { background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 0.375rem; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.fade-in { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.toast { position: fixed; top: 1rem; right: 1rem; padding: 0.75rem 1rem; border-radius: 0.5rem; color: white; font-size: 0.875rem; z-index: 9999; animation: slideIn 0.3s ease; }
.toast-success { background: #10B981; }
.toast-error { background: #EF4444; }
@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

.message-bubble { max-width: 65%; padding: 0.625rem 0.875rem; border-radius: 1rem; position: relative; word-wrap: break-word; }
.message-sent { background: linear-gradient(135deg, #10B981, #059669); color: white; margin-left: auto; border-bottom-right-radius: 0.25rem; }
.message-received { background: #FFFFFF; color: #0F172A; border: 1px solid #E2E8F0; margin-right: auto; border-bottom-left-radius: 0.25rem; }

.typing-dot { width: 6px; height: 6px; background: #94A3B8; border-radius: 50%; display: inline-block; animation: typing 1.4s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; text-align: center; color: #94A3B8; }

.sidebar-item { display: flex; align-items: center; padding: 0.75rem; border-radius: 0.5rem; cursor: pointer; transition: background 0.15s; }
.sidebar-item:hover { background: #F1F5F9; }
.sidebar-item.active { background: #D1FAE5; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn 0.15s; }
.modal-content { background: white; border-radius: 0.75rem; padding: 1.5rem; max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto; animation: slideUp 0.2s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; }
.badge-primary { background: #10B981; color: white; }
.badge-danger { background: #EF4444; color: white; }
.badge-warning { background: #F59E0B; color: white; }

@media (max-width: 768px) {
    .message-bubble { max-width: 85%; }
    .desktop-only { display: none !important; }
}
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}
