/* ============================================================
   AQARI | عقاري - Premium Property Management System
   Main Stylesheet | Dark Navy + Gold Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --navy: #0D1B2A;
  --navy-800: #112236;
  --navy-700: #152B42;
  --navy-600: #1A3550;
  --navy-500: #1E3F5E;
  --gold: #C9A646;
  --gold-light: #E2C06C;
  --gold-dark: #A88835;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --sidebar-width: 260px;
  --header-height: 64px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow: 0 4px 16px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
  --transition: all 0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

body[dir="rtl"],
html[lang="ar"] body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
}

@media (max-width: 768px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-branding { display: none; }
}

.auth-branding {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(201,166,70,0.08) 0%, transparent 60%);
}

.auth-branding-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-branding-logo img {
  filter: brightness(1.05);
  drop-shadow: 0 8px 24px rgba(201,166,70,0.3);
}

.auth-logo-icon {
  display: none;
}

.auth-brand-text-en,
.auth-brand-text-ar {
  display: none;
}

.auth-tagline {
  font-size: 1.1rem;
  color: var(--gray-400);
  text-align: center;
  max-width: 320px;
  line-height: 1.8;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  width: 100%;
  max-width: 380px;
}

.auth-stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,166,70,0.2);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  text-align: center;
}

.auth-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.auth-stat-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  display: block;
  margin-top: 0.25rem;
}

.auth-form-side {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header {
  margin-bottom: 2.5rem;
}

.auth-card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.auth-card-subtitle {
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* ============================================================
   LAYOUT - SIDEBAR + CONTENT
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--navy);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: 4px 0 20px rgba(0,0,0,0.3);
}

[dir="rtl"] .sidebar { left: auto; right: 0; }

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
}

.sidebar-brand img {
  display: block;
  filter: brightness(1);
  transition: opacity 0.2s;
}
.sidebar-brand:hover img {
  opacity: 0.85;
}

.sidebar-logo {
  display: none;
}

.sidebar-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar-brand-en {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}

.sidebar-brand-ar {
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 1rem 0.75rem 0.5rem;
  font-family: 'Inter', sans-serif;
}

[dir="rtl"] .sidebar-section-title { letter-spacing: 0; }

.nav-item { margin-bottom: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(201,166,70,0.15) 0%, rgba(201,166,70,0.08) 100%);
  color: var(--gold);
  border: 1px solid rgba(201,166,70,0.2);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

[dir="rtl"] .nav-link.active::before {
  left: auto;
  right: 0;
  border-radius: 2px 0 0 2px;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

[dir="rtl"] .nav-badge { margin-left: 0; margin-right: auto; }

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.04);
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }

.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--gray-500);
}

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

[dir="rtl"] .main-content { margin-left: 0; margin-right: var(--sidebar-width); }

/* ---- Header ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  padding: 0.25rem;
  border-radius: var(--border-radius-sm);
}

.btn-menu-toggle:hover { background: var(--gray-100); }

.page-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-btn {
  position: relative;
  width: 38px;
  height: 38px;
  background: var(--gray-100);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: var(--transition);
  text-decoration: none;
}

.topbar-btn:hover { background: var(--gray-200); color: var(--navy); }

.topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--gray-100);
  border-radius: var(--border-radius-sm);
  padding: 0.25rem;
}

.lang-btn {
  padding: 0.3rem 0.625rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--navy);
  color: var(--white);
}

.lang-btn.active { background: var(--gold); color: var(--navy); }

/* ---- Page Content ---- */
.page-content {
  flex: 1;
  padding: 1.75rem;
}

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.page-header-subtitle { font-size: 0.875rem; color: var(--gray-500); margin-top: 0.2rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ---- KPI Cards ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.kpi-icon.gold { background: rgba(201,166,70,0.12); color: var(--gold-dark); }
.kpi-icon.blue { background: rgba(59,130,246,0.1); color: var(--info); }
.kpi-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.kpi-icon.red { background: rgba(239,68,68,0.1); color: var(--danger); }
.kpi-icon.purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.kpi-icon.orange { background: rgba(245,158,11,0.1); color: var(--warning); }

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

.kpi-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.kpi-change.up { color: var(--success); }
.kpi-change.down { color: var(--danger); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

[dir="rtl"] .table th { text-align: right; letter-spacing: 0; }

.table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-warning { background: rgba(245,158,11,0.1); color: #D97706; }
.badge-danger { background: rgba(239,68,68,0.1); color: #DC2626; }
.badge-info { background: rgba(59,130,246,0.1); color: #2563EB; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-gold { background: rgba(201,166,70,0.12); color: var(--gold-dark); }
.badge-navy { background: rgba(13,27,42,0.1); color: var(--navy); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-light); box-shadow: 0 4px 12px rgba(201,166,70,0.4); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-600); }

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-outline:hover { background: var(--gray-100); border-color: var(--gray-400); }

.btn-outline-gold {
  background: transparent;
  color: var(--gold-dark);
  border-color: var(--gold);
}
.btn-outline-gold:hover { background: rgba(201,166,70,0.08); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover { background: #DC2626; }

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover { background: #059669; }

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--border-radius);
}

.btn-icon { padding: 0.5rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-label .required { color: var(--danger); margin-inline-start: 0.2rem; }

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  font-family: inherit;
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,166,70,0.12);
}

.form-control::placeholder { color: var(--gray-400); }

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  appearance: none;
  cursor: pointer;
}

[dir="rtl"] .form-select {
  background-position: left 0.75rem center;
  padding-right: 0.875rem;
  padding-left: 2.25rem;
}

.form-text { font-size: 0.8rem; color: var(--gray-400); margin-top: 0.375rem; }
.invalid-feedback { font-size: 0.8rem; color: var(--danger); margin-top: 0.375rem; display: none; }
.form-control.is-invalid + .invalid-feedback { display: block; }

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-radius: 0;
  flex: 1;
}

.input-group .form-control:first-child { border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); }
.input-group .form-control:last-child { border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; }

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  font-size: 0.875rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.input-group-text:first-child {
  border-right: 0;
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.input-group-text:last-child {
  border-left: 0;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

[dir="rtl"] .input-group-text:first-child {
  border-right: 1.5px solid var(--gray-200);
  border-left: 0;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

[dir="rtl"] .input-group-text:last-child {
  border-left: 1.5px solid var(--gray-200);
  border-right: 0;
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

/* Form Grid */
.form-grid { display: grid; gap: 1.25rem; }
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* Checkbox & Radio */
.form-check { display: flex; align-items: center; gap: 0.625rem; }
.form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--gold);
}
.form-check-label { font-size: 0.875rem; color: var(--gray-700); cursor: pointer; }

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #065F46; }
.alert-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #92400E; }
.alert-danger { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #991B1B; }
.alert-info { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); color: #1E40AF; }

.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
}

[dir="rtl"] .toast-container { right: auto; left: 1.25rem; }

.toast {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--success);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

[dir="rtl"] .toast { border-left: none; border-right: 4px solid var(--success); }
.toast.warning { border-color: var(--warning); }
.toast.danger { border-color: var(--danger); }
.toast.info { border-color: var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

[dir="rtl"] @keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   STAT / PROGRESS
   ============================================================ */
.progress {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  transition: width 0.6s ease;
}

.progress-bar.blue { background: linear-gradient(90deg, var(--info) 0%, #60A5FA 100%); }
.progress-bar.green { background: linear-gradient(90deg, var(--success) 0%, #34D399 100%); }
.progress-bar.red { background: linear-gradient(90deg, var(--danger) 0%, #F87171 100%); }

/* ============================================================
   DASHBOARD CHARTS
   ============================================================ */
.chart-container {
  position: relative;
  height: 280px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.page-link {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  padding: 0 0.5rem;
}

.page-link:hover { background: var(--gray-100); border-color: var(--gray-300); }
.page-link.active { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; }
.page-item.disabled .page-link { opacity: 0.5; pointer-events: none; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--gray-400);
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--gray-500);
  max-width: 320px;
  margin-bottom: 1.5rem;
}

/* ============================================================
   SEARCH / FILTERS
   ============================================================ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

[dir="rtl"] .search-input-wrap .search-icon { left: auto; right: 0.875rem; }

.search-input-wrap .form-control {
  padding-left: 2.5rem;
}

[dir="rtl"] .search-input-wrap .form-control {
  padding-left: 0.875rem;
  padding-right: 2.5rem;
}

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

[dir="rtl"] .dropdown-menu { right: auto; left: 0; }

.dropdown-menu.show { display: block; animation: fadeInDown 0.15s ease; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: var(--transition);
}

[dir="rtl"] .dropdown-item { text-align: right; }

.dropdown-item:hover { background: var(--gray-50); color: var(--navy); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.05); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 0.25rem 0; }

/* ============================================================
   PROPERTY / UNIT CARDS (Grid view)
   ============================================================ */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.property-card {
  background: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.property-card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy) 100%);
  position: relative;
  overflow: hidden;
}

.property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card-image .property-type-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

[dir="rtl"] .property-card-image .property-type-badge { left: auto; right: 0.75rem; }

.property-card-body { padding: 1.25rem; flex: 1; }
.property-card-name { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 0.35rem; }
.property-card-address { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 1rem; }

.property-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  border-top: 1px solid var(--gray-100);
  padding-top: 1rem;
  margin-top: 0.75rem;
}

.property-card-stat { text-align: center; }
.property-card-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--navy); display: block; }
.property-card-stat-label { font-size: 0.7rem; color: var(--gray-400); display: block; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.show { display: flex; }

.modal-dialog {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-dialog.modal-lg { max-width: 760px; }
.modal-dialog.modal-sm { max-width: 380px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.modal-title { font-size: 1rem; font-weight: 600; color: var(--navy); }

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--gray-100);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
}

.modal-close:hover { background: var(--gray-200); color: var(--danger); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
}

[dir="rtl"] .modal-footer { justify-content: flex-start; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notification-item {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.notification-item:hover { background: var(--gray-50); }

.notification-item.unread { background: rgba(201,166,70,0.04); }

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon.success { background: rgba(16,185,129,0.1); color: var(--success); }
.notification-icon.warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.notification-icon.danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.notification-icon.info { background: rgba(59,130,246,0.1); color: var(--info); }

.notification-content { flex: 1; }

.notification-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.notification-message {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.notification-time {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 0.3rem;
}

.notification-dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.4rem;
}

/* ============================================================
   DETAILS / INFO ROWS
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}

@media (max-width: 600px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-item {}
.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 0.3rem;
}
[dir="rtl"] .detail-label { letter-spacing: 0; }
.detail-value { font-size: 0.925rem; font-weight: 500; color: var(--navy); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.625rem 1.125rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-family: inherit;
}

.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--gold-dark); border-bottom-color: var(--gold); font-weight: 600; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   CURRENCY DISPLAY
   ============================================================ */
.currency-amount {
  font-weight: 700;
  color: var(--navy);
}

.currency-amount .aed-label {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--gold-dark);
  margin-inline-start: 0.2rem;
}

/* ============================================================
   MOBILE SIDEBAR TOGGLE
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; margin-right: 0 !important; }
  .btn-menu-toggle { display: flex; }
  .sidebar-overlay.show { display: block; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .sidebar, .topbar, .btn, .filters-bar { display: none !important; }
  .main-content { margin: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-gold { color: var(--gold-dark); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* RTL flip for directional icons (arrows) */
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }

/* ============================================================
   AQARI AI CHATBOT WIDGET
   ============================================================ */

.aqari-chat {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  font-family: var(--font-main, 'Cairo', 'Inter', sans-serif);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
[dir="rtl"] .aqari-chat {
  right: auto;
  left: 1.5rem;
}

/* ── Toggle Button ── */
.chat-toggle-btn {
  width: 62px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0D1B2A 0%, #162B42 52%, #C9A646 180%);
  border: 1px solid rgba(255,255,255,0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 38px rgba(13,27,42,0.28), 0 6px 18px rgba(201,166,70,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  color: #F8E6A0;
}
.chat-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(13,27,42,0.34), 0 8px 24px rgba(201,166,70,0.32);
}
.chat-toggle-btn:active { transform: scale(0.96); }

.chat-toggle-label {
  position: absolute;
  inset-inline-end: 72px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: #fff;
  color: #0D1B2A;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(13,27,42,0.14);
}
[dir="rtl"] .chat-toggle-label {
  inset-inline-end: auto;
  inset-inline-start: 72px;
}

.chat-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  background: #EF4444;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: pulse-badge 1.5s infinite;
}
@keyframes pulse-badge {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ── Panel ── */
.chat-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 390px;
  height: min(640px, calc(100vh - 7rem));
  background: #fff;
  border: 1px solid rgba(226,232,240,0.92);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(13,27,42,0.26), 0 8px 22px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
}
[dir="rtl"] .chat-panel {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}
.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Header ── */
.chat-header {
  background:
    linear-gradient(135deg, rgba(201,166,70,0.16) 0%, rgba(201,166,70,0) 42%),
    linear-gradient(135deg, #0D1B2A 0%, #1A3550 100%);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 0.65rem; }
.chat-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #C9A646, #e8c96b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0D1B2A;
  flex-shrink: 0;
}
.chat-header-name { color: #fff; font-weight: 700; font-size: 0.9rem; }
.chat-header-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  margin-top: 1px;
}
.chat-status-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink-dot 2s infinite;
}
@keyframes blink-dot {
  0%,100% { opacity:1; } 50% { opacity:0.4; }
}
.chat-header-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.75);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.chat-header-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ── Messages area ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background:
    linear-gradient(180deg, rgba(248,250,252,0.96), rgba(241,245,249,0.92)),
    #F8FAFC;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }

/* Welcome */
.chat-welcome {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}
.chat-welcome-avatar {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-welcome-text {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 0 12px 12px 12px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.55;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[dir="rtl"] .chat-welcome-text { border-radius: 12px 0 12px 12px; }

/* Quick actions */
.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-inline-start: 42px;
}
.quick-btn {
  background: #fff;
  border: 1px solid #E2E8F0;
  color: #0D1B2A;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.quick-btn:hover {
  background: #0D1B2A;
  color: #C9A646;
  border-color: #0D1B2A;
}

/* Message bubbles */
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 90%;
  animation: msg-in 0.2s ease;
}
@keyframes msg-in {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: translateY(0); }
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg.bot { align-self: flex-start; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.chat-msg.bot .msg-avatar {
  background: linear-gradient(135deg,#0D1B2A,#1A3550);
  color: #C9A646;
}
.chat-msg.user .msg-avatar {
  background: linear-gradient(135deg,#C9A646,#e8c96b);
  color: #0D1B2A;
}

.msg-bubble {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.83rem;
  line-height: 1.55;
  max-width: 285px;
  word-break: break-word;
}
.chat-msg.bot .msg-bubble {
  background: #fff;
  color: #1E293B;
  border: 1px solid #E2E8F0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[dir="rtl"] .chat-msg.bot .msg-bubble {
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 4px;
}
.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, #0D1B2A, #1A3550);
  color: #fff;
  border-bottom-right-radius: 4px;
}
[dir="rtl"] .chat-msg.user .msg-bubble {
  border-bottom-right-radius: 14px;
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-typing {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  align-self: flex-start;
  animation: msg-in 0.2s ease;
}
.typing-bubble {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 0.7rem 1rem;
  display: flex;
  gap: 4px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[dir="rtl"] .typing-bubble {
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 4px;
}
.typing-dot {
  width: 7px;
  height: 7px;
  background: #C9A646;
  border-radius: 50%;
  animation: typing-anim 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-anim {
  0%,60%,100% { transform: translateY(0); opacity:0.4; }
  30% { transform: translateY(-5px); opacity:1; }
}

/* ── Input area ── */
.chat-input-area {
  border-top: 1px solid #E2E8F0;
  background: #fff;
  padding: 0.75rem 1rem 0.6rem;
  flex-shrink: 0;
}
.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  transition: border-color 0.15s;
}
.chat-input-wrap:focus-within { border-color: #C9A646; }
.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-size: 0.83rem;
  color: #0D1B2A;
  line-height: 1.5;
  max-height: 100px;
  outline: none;
  font-family: inherit;
}
.chat-input::placeholder { color: #94A3B8; }
.chat-send-btn {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #C9A646, #e8c96b);
  border: none;
  border-radius: 8px;
  color: #0D1B2A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send-btn:not(:disabled):hover { transform: scale(1.08); }
.chat-footer-note {
  text-align: center;
  font-size: 0.68rem;
  color: #94A3B8;
  margin-top: 0.4rem;
}

/* Mobile */
@media (max-width: 480px) {
  .chat-panel { width: calc(100vw - 2rem); right: -0.25rem; }
  [dir="rtl"] .chat-panel { right: auto; left: -0.25rem; }
  .aqari-chat { bottom: 1rem; right: 1rem; }
  [dir="rtl"] .aqari-chat { right: auto; left: 1rem; }
  .chat-toggle-label { display: none; }
  .chat-panel { height: min(620px, calc(100vh - 6rem)); }
  .msg-bubble { max-width: calc(100vw - 6.5rem); }
}

@media print {
  .aqari-chat { display: none !important; }
}
