﻿:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  direction: rtl;
  text-align: right;
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.card-body {
  color: var(--text);
}

.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.table {
  color: var(--text);
}

.table thead th {
  background: #eff6ff;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.form-label {
  color: var(--text);
  font-weight: 600;
}

.form-control,
.form-select,
textarea {
  background: #fff;
  color: var(--text);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
  color: var(--text);
  background: #fff;
}

.btn {
  border-radius: 10px;
}

.btn-indigo {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.btn-indigo:hover {
  background: var(--primary-dark);
  color: #fff;
}

.bg-indigo {
  background: var(--primary) !important;
  color: #fff !important;
}

.alert {
  border-radius: 12px;
}

.badge {
  border-radius: 999px;
}

.card-text {
  color: var(--text);
}

.text-muted {
  color: var(--muted) !important;
}

.chat-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.chat-message {
  border-radius: 14px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.chat-message.me {
  background: #dbeafe;
  color: #0f172a;
  margin-right: auto;
}

.chat-message.other {
  background: #f1f5f9;
  color: #0f172a;
  margin-left: auto;
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

@media (max-width: 768px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

#msg-badge,
#notif-badge {
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-weight: 700;
}

.message-form {
  position: relative;
}

.message-input-wrap {
  position: relative;
}

.emoji-picker-wrapper {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 20;
}

.emoji-toggle-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding: 0;
  background: #ffffff;
}

.emoji-toggle-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

#messageContent {
  min-height: 26px;
  max-height: 180px;
  padding-left: 3.5rem;
  resize: none;
  overflow-y: hidden;
}

.emoji-picker {
  position: absolute;
  bottom: 52px;
  left: 0;
  width: 280px;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  padding: 0.65rem;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.35rem;
}

.emoji-item {
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.45rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.emoji-item:hover {
  background: #eff6ff;
  transform: scale(1.08);
}

.emoji-item:focus {
  outline: none;
  background: #dbeafe;
}

.message-submit-btn {
  height: 26px;
}
