:root {
  --primary-dark: #0B2A4A;
  --primary: #1A4D7A;
  --primary-light: #3A7CA5;
  --accent: #E67E22;
  --accent-light: #F39C12;
  --success: #27AE60;
  --danger: #C0392B;
  --warning: #F39C12;
  --bg: #F4F7FC;
  --card-bg: #FFFFFF;
  --text-dark: #1E2A3A;
  --text-muted: #5D6D7E;
  --border-light: #E5E9F0;
  --rematch: #3b82f6;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,20,40,0.08);
  --shadow-lg: 0 16px 32px rgba(0,0,0,0.12);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

.topbar {
  background: var(--primary-dark);
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(11, 42, 74, 0.95);
}

.topbar {
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* زر القائمة السوداء */

.blacklist-btn {
  background: #C0392B;
  color: white;
  border: none;
  border-radius: 40px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,0.2);
}
.blacklist-btn:hover {
  background: #A93226;
  transform: scale(1.02);
}

.brand i {
  color: var(--accent);
  margin-left: 8px;
}

.user-info {
  background: rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: 40px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.user-info:hover {
  background: rgba(255,255,255,0.25);
}
.user-info i {
  font-size: 1.2rem;
}

.dropdown-menu.show {
  display: block;
}
.dropdown-header {
  padding: 12px 16px;
  background: var(--primary-light);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.dropdown-header strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}
.dropdown-header span {
  font-size: 0.85rem;
  opacity: 0.9;
}
.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
}
.dropdown-item:hover {
  background: #f0f0f0;
}
.dropdown-item i {
  width: 20px;
  color: var(--danger);
}

.quick-nav {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}
.quick-nav button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--primary-dark);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-nav button:hover {
  background: var(--accent);
  transform: scale(1.1);
}

.filter-wrapper {
  max-width: 1200px;
  margin: 24px auto 16px;
  padding: 0 20px;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.filter-bar label {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1rem;
}
.filter-bar select {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  background: white;
  cursor: pointer;
  transition: var(--transition);
}
.filter-bar select:hover {
  border-color: var(--primary-light);
}
.filter-bar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.advanced-search {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-top: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--primary-dark);
}

.search-header i {
  transition: transform 0.3s;
}
.search-header.collapsed i {
  transform: rotate(-90deg);
}
.search-body {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  transition: all 0.3s;
}
.search-body.collapsed {
  display: none;
}

.search-body input,
.search-body select {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--border-light);
  border-radius: 30px;
  font-size: 0.9rem;
}
.search-body .specs-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #f9fafc;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  grid-column: 1 / -1;
}
.search-body .specs-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.9rem;
  background: white;
  padding: 8px 12px;
  border-radius: 30px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.search-body .specs-group label:hover {
  border-color: var(--accent);
  background: #fff2e0;
  transform: translateY(-2px);
}
.search-body .specs-group label i {
  color: var(--accent);
  font-size: 1rem;
  width: 20px;
}
.search-body .specs-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin-left: 5px;
}
.search-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 60px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.search-btn:hover {
  background: var(--primary-dark);
}
.reset-btn {
  background: #e0e6ed;
  color: var(--text-dark);
  border: none;
  border-radius: 60px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.reset-btn:hover {
  background: #d0dae5;
}

.container {
  max-width: 1350px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.property-list {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  height: auto;
  max-height: none;
  overflow-y: visible;
}
.list-header {
  background: var(--primary);
  color: white;
  padding: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.list-header button {
  background: var(--accent);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.list-header button:hover {
  background: #d35400;
  transform: scale(1.1);
}
.property-card {
  background: #f9fafc;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.property-card:hover {
  background: #f0f5fe;
}
.property-card.active {
  background: #e3f2fd;
  border-right: 4px solid var(--accent);
}
.property-card.finished {
  background: linear-gradient(145deg, #fef5f5, #fce9e9);
  border-right: 4px solid var(--danger);
}
.property-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 5px;
}
.property-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.property-card p i {
  width: 20px;
  color: var(--primary-light);
}
.property-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}
.property-actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.property-actions .delete-btn {
  background: var(--danger);
  color: white;
}
.property-actions .delete-btn:hover {
  transform: scale(1.1);
}

.details-container {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #f0f0f0;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slides {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease-out;
}
.slides .slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}
.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.default-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white;
  width: 100%;
  height: 100%;
}
.default-image i {
  font-size: 5rem;
  margin-bottom: 1rem;
}
.default-image span {
  font-size: 1.2rem;
  font-weight: 700;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.2);
}
.slider-btn:hover {
  background: rgba(255,255,255,0.6);
  color: var(--primary-dark);
}
.prev { right: 20px; }
.next { left: 20px; }
.slide-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: white;
  padding: 4px 16px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
}
.property-info {
  padding: 24px;
}
.property-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-tag {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  background: rgba(230, 126, 34, 0.1);
  display: inline-block;
  padding: 4px 20px;
  border-radius: 60px;
  margin: 8px 0 16px;
  border: 1px solid rgba(230,126,34,0.3);
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.meta-item i {
  color: var(--primary);
  font-size: 1.2rem;
  width: 28px;
}
.owner-info {
  background: #f0f5fe;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid #d4e2f0;
}
.owner-info a {
  background: #25D366;
  color: white;
  padding: 8px 20px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.owner-info a:hover {
  background: #128C7E;
  transform: scale(1.02);
}
.location-box {
  background: #f0f5fe;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid #d4e2f0;
}
.location-box a {
  background: var(--primary);
  color: white;
  padding: 8px 20px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.location-box a:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}
.action-buttons {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.btn-success {
  background: linear-gradient(145deg, var(--success), #219653);
  color: white;
}
.btn-success:hover {
  background: linear-gradient(145deg, #219653, var(--success));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-danger {
  background: linear-gradient(145deg, var(--danger), #A93226);
  color: white;
}
.btn-danger:hover {
  background: linear-gradient(145deg, #A93226, var(--danger));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-pdf {
  background: var(--primary);
  color: white;
}
.btn-pdf:hover {
  background: var(--primary-dark);
}
.bids-section {
  padding: 24px;
  border-top: 2px dashed var(--border-light);
}
.bids-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.bids-header i {
  font-size: 1.8rem;
  color: var(--accent);
}
.bid-card {
  background: #fafbfe;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  position: relative;
}
.bid-card.top-bid {
  border: 2px solid var(--accent);
  background: linear-gradient(145deg, #fff7ed, #ffe8d4);
}
.bid-amount {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary-dark);
}
.bid-amount i {
  color: gold;
  margin-left: 6px;
}
.bid-info {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bid-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bid-info a:hover {
  text-decoration: underline;
}
.bid-time {
  font-size: 0.85rem;
  background: #eef2f6;
  padding: 4px 8px;
  border-radius: 40px;
}
.sale-summary {
  background: #e8f5e9;
  border-right: 4px solid var(--success);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.sale-summary p {
  margin: 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}
.modal-content {
  background: var(--card-bg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.3s ease;
  position: relative;
  cursor: grab;
  user-select: none;
}
.modal-content:active {
  cursor: grabbing;
}
.modal-header {
  padding: 20px 28px;
  background: var(--primary-dark);
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-header .close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-header .close-btn:hover {
  transform: scale(1.1);
  color: var(--accent);
}
.modal-body {
  padding: 28px;
  max-height: calc(90vh - 80px);
  overflow-y: auto;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-light);
  border-radius: 60px;
  font-size: 1rem;
  transition: var(--transition);
}
.form-group textarea {
  border-radius: 20px;
  resize: vertical;
  min-height: 80px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230,126,34,0.2);
}
.form-group input[readonly] {
  background-color: #f0f0f0;
  color: #555;
  cursor: not-allowed;
}
#mapContainer {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-light);
  margin-bottom: 10px;
}
.selected-coords {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.selected-coords input {
  flex: 1;
  background-color: #f0f0f0;
}
.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border-light);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-item .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(255,0,0,0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.modal-actions button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-cancel {
  background: #e0e6ed;
  color: var(--text-dark);
}
.btn-cancel:hover {
  background: #d0dae5;
}
.btn-submit {
  background: var(--accent);
  color: white;
}
.btn-submit:hover {
  background: #d35400;
  transform: translateY(-2px);
}
.commission-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.commission-row select {
  width: 120px;
  flex-shrink: 0;
}
#invoiceSection {
  display: none;
}
@media print {
  body * {
    visibility: hidden;
  }
  #invoiceSection, #invoiceSection * {
    visibility: visible;
  }
  #invoiceSection {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    background: white;
    padding: 20px;
    font-family: 'Tajawal', sans-serif;
  }
  .no-print {
    display: none;
  }
}
.invoice-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.invoice-header {
  text-align: center;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.invoice-header h1 {
  color: var(--primary-dark);
  font-size: 2rem;
}
.invoice-details {
  margin: 20px 0;
}
.invoice-details p {
  margin: 10px 0;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 5px;
}
.signature-row {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}
.signature-box {
  width: 45%;
  text-align: center;
}
.signature-line {
  border-top: 2px solid #333;
  margin-top: 40px;
  padding-top: 10px;
}
.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .search-body .specs-group {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .action-buttons {
    flex-direction: column;
  }
  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  .prev { right: 8px; }
  .next { left: 8px; }
  .search-body .specs-group {
    grid-template-columns: 1fr;
  }
  .quick-nav {
    bottom: 15px;
    right: 15px;
  }
  .quick-nav button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
.custom-alert-overlay.show {
  opacity: 1;
  visibility: visible;
}
.custom-alert-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 90%;
  padding: 0;
  transform: scale(0.9);
  transition: transform 0.2s ease;
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.custom-alert-overlay.show .custom-alert-box {
  transform: scale(1);
}
.custom-alert-header {
  padding: 15px 20px;
  background: var(--primary-dark);
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.custom-alert-header i {
  color: var(--accent);
}
.custom-alert-body {
  padding: 25px 20px;
  font-size: 1.1rem;
  color: var(--text-dark);
  text-align: center;
  min-height: 80px;
}
.custom-alert-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  gap: 15px;
}
.custom-alert-footer button {
  padding: 10px 30px;
  border: none;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 100px;
}
.btn-alert-confirm {
  background: var(--accent);
  color: white;
}
.btn-alert-confirm:hover {
  background: #d35400;
}
.btn-alert-cancel {
  background: #e0e6ed;
  color: var(--text-dark);
}
.btn-alert-cancel:hover {
  background: #d0dae5;
}

/* أنماط القائمة السوداء */
.blacklist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.blacklist-table th,
.blacklist-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.blacklist-table th {
  background: var(--primary-light);
  color: white;
  font-weight: 700;
}
.blacklist-table tr:hover {
  background: #f5f5f5;
}
.blacklist-table .delete-blacklist-btn {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: var(--transition);
}
.blacklist-table .delete-blacklist-btn:hover {
  transform: scale(1.1);
}


#toggleAddBlacklist {
  background-color: #f8f9fa;
  padding: 10px 15px;
  border-radius: 60px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

#toggleAddBlacklist:hover {
  background-color: #e9ecef;
}

#toggleIcon {
  font-size: 1.8rem;
  line-height: 1;
}

.meta-item {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 60px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-item:hover {
  border-color: var(--accent);
  background: white;
}

.meta-item i {
  color: var(--accent);
  font-size: 1.2rem;
  width: 24px;
}

.meta-item strong {
  color: var(--primary-dark);
  font-weight: 700;
  margin-left: 4px;
}

.whatsapp-link {
    color: #25D366;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(37, 211, 102, 0.1);
    padding: 0px 10px;
    border-radius: 40px;
}

.whatsapp-link:hover {
    background: #128C7E;
    color: white;
    text-decoration: none;
}

/* ===== أنماط عرض القائمة (list view) ===== */
.property-list.list-view .property-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.property-list.list-view .property-card h3 {
  font-size: 1rem;
  margin: 0;
  min-width: 180px;
}

.property-list.list-view .property-card p {
  font-size: 0.8rem;
  margin: 0;
  width: auto;
}

.property-list.list-view .property-card p i {
  width: 16px;
}

.property-list.list-view .property-card .property-actions {
  margin: 0;
  margin-right: auto;
}

/* نظهر فقط المعلومات الأساسية في وضع القائمة */
.property-list.list-view .property-card p:not(:nth-of-type(1)):not(:nth-of-type(2)):not(:nth-of-type(3)):not(:nth-of-type(4)) {
  display: none;
}

/* رقم العرض، الموقع، السعر، المزايدات */
.property-list.list-view .property-card p:nth-of-type(1),
.property-list.list-view .property-card p:nth-of-type(2),
.property-list.list-view .property-card p:nth-of-type(3),
.property-list.list-view .property-card p:nth-of-type(4) {
  display: flex;
}

.content-section {
  display: none;
}
.content-section.active {
  display: block;
}

/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/
/*-- أنماط ادارة الامكلا --*/

/* ========== أنماط إدارة الأملاك (إضافية) ========== */

.estates-list {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  height: fit-content;
}

.estate-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.estate-item:hover {
  background: #f0f5fe;
}
.estate-item.active {
  background: #e3f2fd;
  border-right: 4px solid var(--accent);
}
.estate-item.disabled {
  opacity: 0.6;
  background: #f5f5f5;
}
.estate-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 5px;
}
.estate-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.estate-item .units-count {
  display: inline-block;
  background: var(--primary-light);
  color: white;
  padding: 2px 8px;
  border-radius: 40px;
  font-size: 0.8rem;
  margin-top: 8px;
}
.estate-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}
.estate-actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.estate-actions .disable-btn {
  background: var(--warning);
  color: white;
}
.estate-actions .delete-btn {
  background: var(--danger);
  color: white;
}
.estate-actions button:hover {
  transform: scale(1.1);
}

/* تفاصيل العقار والوحدات */
.estate-header {
  padding: 20px 24px;
  background: linear-gradient(145deg, #f8fafd, #eef2f7);
  border-bottom: 2px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.estate-header h2 {
  color: var(--primary-dark);
  font-size: 1.8rem;
  font-weight: 900;
}
.estate-header .badge {
  background: var(--accent);
  color: white;
  padding: 5px 15px;
  border-radius: 40px;
  font-weight: 700;
}
.estate-header .estate-status {
  background: var(--success);
  color: white;
  padding: 5px 15px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
  margin-right: 10px;
}

.units-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.unit-card {
  background: #f9fafc;
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
}
.unit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.unit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.unit-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.unit-status {
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 700;
}
.status-rented {
  background: #e8f5e9;
  color: #27ae60;
  border: 1px solid #27ae60;
}
.status-available {
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #1976d2;
}
.status-maintenance {
  background: #fff3e0;
  color: #e67e22;
  border: 1px solid #e67e22;
}
.unit-details p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.unit-details i {
  width: 20px;
  color: var(--primary);
}
.tenant-info {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 15px 0;
  border: 1px solid var(--border-light);
}
.tenant-info h4 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.payment-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 5px;
}
.payment-paid {
  background: #e8f5e9;
  color: #27ae60;
}
.payment-pending {
  background: #fff3e0;
  color: #e67e22;
}
.payment-overdue {
  background: #fee;
  color: #c0392b;
}
.unit-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.btn-small {
  padding: 8px 16px;
  border: none;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-small.success {
  background: var(--success);
  color: white;
}
.btn-small.warning {
  background: var(--accent);
  color: white;
}
.btn-small.danger {
  background: var(--danger);
  color: white;
}
.btn-small.primary {
  background: var(--primary);
  color: white;
}
.btn-small:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* خريطة إدارة الأملاك */
#mapContainerMgmt {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-light);
  margin-bottom: 10px;
}

/*----------------------*/

/* الشبكة (الوضع الافتراضي) */
#estatesListContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

/* وضع القائمة المضغوطة */
#estatesListContainer.list-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* تنسيق بطاقة العقار في وضع القائمة */
#estatesListContainer.list-view .estate-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* إخفاء العناصر غير الأساسية في وضع القائمة (يمكن تخصيصها) */
#estatesListContainer.list-view .estate-card p:nth-child(4),  /* أضيف بواسطة */
#estatesListContainer.list-view .estate-card .units-count {
  display: none;
}

/* عرض البيانات الأساسية بشكل أفقي */
#estatesListContainer.list-view .estate-card h4 {
  width: auto;
  margin: 0;
  min-width: 180px;
  font-size: 0.9rem;
}

#estatesListContainer.list-view .estate-card p {
  margin: 0;
  white-space: nowrap;
}

#estatesListContainer.list-view .estate-card .estate-actions {
  margin: 0;
  gap: 6px;
}

/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */
/* ===== شريط التنقل السفلي للجوال ===== */


.bottom-nav {
  display: none; /* يظهر فقط في الجوال */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  border-radius: 30px 30px 0 0;
  padding: 10px 15px;
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(230, 126, 34, 0.2);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: var(--transition);
  padding: 5px 10px;
  border-radius: 40px;
  text-decoration: none;
  min-width: 60px;
}

.bottom-nav-item i {
  font-size: 1.4rem;
  margin-bottom: 3px;
  background: transparent;
  padding: 8px;
  border-radius: 50%;
  transition: 0.2s;
}

.bottom-nav-item.active {
  color: var(--accent);
  font-weight: 700;
}

.bottom-nav-item.active i {
  background: rgba(230, 126, 34, 0.15);
  color: var(--accent);
}

.bottom-nav-item:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* إظهار الشريط السفلي فقط في الجوال */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
  /* إخفاء الأزرار العلوية في الجوال (اختياري) */
  .topbar .brand button:not(.blacklist-btn) {
    display: none !important;
  }
  .topbar .brand .blacklist-btn {
    margin-right: auto;
  }

  #propTitle, #propDescription {
    grid-column: unset !important;
  }
     
}



/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */
/* تنسيق قسم الطلبات */


.requests-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.request-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: 0.2s;
}
.request-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.request-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-dark);
}
.request-status {
  background: #f1c40f;
  color: #2c3e50;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.request-status.matched {
  background: #2ecc71;
  color: white;
}
.request-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}
.detail-item {
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.request-actions {
  margin-top: 12px;
  text-align: left;
}
.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  margin-left: 8px;
}
.btn-small.success { background: #27ae60; color: white; }
.btn-small.primary { background: #2980b9; color: white; }

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}
.form-group.half {
  flex: 1;
}


/* تنسيق خاص بقسم طلبات العملاء */
#content-requests .container {
  max-width: 1350px;
  margin: 15px auto 40px;
  padding: 0 20px;
  display: grid;
}

#content-requests .requests-list-panel {
  flex: 1;
  min-width: 280px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
#content-requests .details-container {
  flex: 2;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  min-height: 500px;
}

#content-requests .list-header {
  background: var(--primary);
  color: white;
  padding: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

#content-requests .list-header .badge {
  background: rgba(255,255,255,0.2);
  border-radius: 30px;
  padding: 2px 10px;
  font-size: 0.8rem;
  margin-right: 10px;
}

#content-requests .list-header button {
  background: var(--accent);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

#content-requests .list-header button:hover {
  background: #d35400;
  transform: scale(1.1);
}

/*
#content-requests #requestsListContainer {
  max-height: 70vh;
  overflow-y: auto;
}
*/

#content-requests .request-card {
  background: #f9fafc;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

#content-requests .request-card:hover {
  background: #f0f5fe;
}

#content-requests .request-card.active {
  background: #e3f2fd;
  border-right: 4px solid var(--accent);
}

#content-requests .request-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 5px;
}
#content-requests .request-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

#content-requests .request-card p i {
  width: 20px;
  color: var(--primary-light);
}

#content-requests .request-status {
  background: #f1c40f;
  color: #2c3e50;
  padding: 2px 10px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

#content-requests .request-status.matched {
  background: #2ecc71;
  color: white;
}


#content-requests .request-actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#content-requests .request-actions .edit-request-btn {
  background: var(--primary-light);
  color: white;
}

#content-requests .request-actions .delete-request-btn {
  background: var(--danger);
  color: white;
}

#content-requests .request-actions button:hover {
  transform: scale(1.1);
}

#content-requests .details-container {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.requests-list-panel.list-view .request-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.requests-list-panel.list-view .request-card h4 {
  font-size: 1rem;
  margin: 0;
  min-width: 180px;
}

.requests-list-panel.list-view .request-card p {
  font-size: 0.8rem;
  margin: 0;
  width: auto;
}

/* تنسيق خاص بقسم طلبات العملاء */
/* تنسيق خاص بقسم طلبات العملاء */
/* تنسيق خاص بقسم طلبات العملاء */
/* تنسيق خاص بقسم طلبات العملاء */
/* تنسيق خاص بقسم طلبات العملاء */
/* تنسيق خاص بقسم طلبات العملاء */
/* تنسيق خاص بقسم طلبات العملاء */


/* جعل تفاصيل الطلب بنفس تنسيق تفاصيل العقار */
#content-requests .details-container .request-details-view {
  padding: 24px;
}

#content-requests .request-header-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 15px;
}

#content-requests .request-header-details h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#content-requests .request-header-details .request-status {
  font-size: 1rem;
  padding: 6px 20px;
  border-radius: 60px;
  background: #f1c40f;
  color: #2c3e50;
}

#content-requests .request-header-details .request-status.matched {
  background: #2ecc71;
  color: white;
}

/* استخدام meta-grid و meta-item */
#content-requests .request-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

#content-requests .request-meta-item {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 60px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#content-requests .request-meta-item:hover {
  border-color: var(--accent);
  background: white;
}

#content-requests .request-meta-item i {
  color: var(--accent);
  font-size: 1.2rem;
  width: 28px;
}

#content-requests .request-meta-item strong {
  color: var(--primary-dark);
  font-weight: 700;
  margin-left: 4px;
}

/* أزرار الإجراءات */
#content-requests .request-action-buttons {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

#content-requests .request-action-buttons .btn {
  padding: 12px 24px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

#content-requests .request-action-buttons .btn-edit {
  background: var(--primary);
  color: white;
}
#content-requests .request-action-buttons .btn-delete {
  background: var(--danger);
  color: white;
}
#content-requests .request-action-buttons .btn-share {
  background: #25D366;
  color: white;
}
#content-requests .request-action-buttons .btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/* الشبكة (الوضع الافتراضي) */
#requestsListContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

/* وضع القائمة - تخطيط مضغوط جداً */
#requestsListContainer.list-view {
  display: flex;
  flex-direction: column;
  gap: 6px;            /* تقليص المسافة بين البطاقات */
}

/* تنسيق البطاقة في وضع القائمة - مضغوط */
#requestsListContainer.list-view .request-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;       /* مسافات أفقية وعمودية صغيرة */
  padding: 8px 12px;   /* تقليص الحشوة الداخلية */
  margin: 0;
  font-size: 0.85rem;  /* خط أصغر قليلاً */
}

/* توزيع العناصر بحيث تأخذ مساحة أقل */
#requestsListContainer.list-view .request-card h4 {
  width: auto;
  margin: 0;
  font-size: 0.9rem;
  min-width: 140px;    /* عرض كافي للاسم + رقم الطلب */
}

#requestsListContainer.list-view .request-card p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap; /* منع التفاف النص */
}

/* إخفاء المواصفات (specsHtml) في وضع القائمة لأنها تأخذ مساحة كبيرة */
#requestsListContainer.list-view .request-card div[style*="margin-top: 8px"],
#requestsListContainer.list-view .request-card div[style*="background: #f0f2f5"] {
  display: none;
}

/* إخفاء نوع العقار ونوع الصفقة إذا أردت تقليص أكثر (اختياري) */
#requestsListContainer.list-view .request-card p:nth-child(5),
#requestsListContainer.list-view .request-card p:nth-child(6) {
  display: none;
}

/* تبقي فقط على: الاسم، الموقع، السعر، المساحة، الحالة */
#requestsListContainer.list-view .request-card .request-status {
  margin: 0;
  padding: 2px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* مجموعة الأزرار تبقى في اليمين */
#requestsListContainer.list-view .request-actions {
  margin: 0;
  gap: 6px;
}

/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/
/*====================================================*/


/*---------- دالة الاكمال التلقائي --*/

.suggestions-box {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.suggestion-item {
  padding: 8px;
  cursor: pointer;
}
.suggestion-item:hover {
  background-color: #f0f0f0;
}


/*---------*/
/* التبهيت الأساسي */
.price-tag-higher-bid {
  background: linear-gradient(135deg, #ff4d4d, #ff1a1a) !important;
  color: white !important;
  border: 2px solid #ffcc00 !important;
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.6) !important;
  position: relative;
  animation: pulse 1.2s infinite ease-in-out;
}

/* تأثير وميض (نبض) */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

/* النص الإضافي (أعلى مزايدة) */
.bid-alert {
  display: inline-block;
  background-color: #ffcc00;
  color: #b30000;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 30px;
  margin-right: 10px;
  white-space: nowrap;
}

.mshtop {
  text-decoration: line-through;
  color: #999;
}

.mshtop1 {
  display: none !important;
}


/*=== قائمة العقود السابقة ===*/
/*=== قائمة العقود السابقة ===*/
/*=== قائمة العقود السابقة ===*/
/*=== قائمة العقود السابقة ===*/
/*=== قائمة العقود السابقة ===*/
/*=== قائمة العقود السابقة ===*/

.contract-item.current-contract {
  background: #e8f5e9;
  border-right: 3px solid #2ecc71;
}

.contract-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.active-badge {
  background: #2ecc71;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.view-contract-btn {
    background-color: #00BCD4;
    color: #fff;
}

.contract-item {
    margin: 10px;
    padding: 10px;
    border: 1px solid #00BCD4;
    border-radius: 12px;
}

 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */
 /* ==== مودال البحث والتصفية لادارة الاملاك ==== */

/* أيقونة السهم: استخدام محتوى وهمي بدلاً من التعامل مع JS */
.search-header i.fa-chevron-down::before,
.search-header i.fa-chevron-up::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f078"; /* chevron-down افتراضي */
}
.search-header.collapsed i.fa-chevron-down::before {
    content: "\f077"; /* chevron-up عندما يكون مطويًا */
}

.specs-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.specs-group.full-width {
  grid-column: 1 / -1;
}
.date-range-group {
  grid-template-columns: repeat(4, 1fr);
}
.date-range {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.date-range label {
  font-size: 0.8rem;
  color: #555;
}
textarea {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: inherit;
  resize: vertical;
}

/*==== اكواد موديل البحث والتصفية لادرة الاملاك  ====*/
/*==== اكواد موديل البحث والتصفية لادرة الاملاك  ====*/
/*==== اكواد موديل البحث والتصفية لادرة الاملاك  ====*/
/*==== اكواد موديل البحث والتصفية لادرة الاملاك  ====*/

/* موديل نتائج البحث - مستقل تماماً */
.search-results-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000; /* أعلى من الموديلات الأخرى */
}

.search-results-modal-content {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 20px 20px 0 0;
}

.search-results-modal-header h3 {
  margin: 0;
  color: #1e3a5f;
  font-size: 1.3rem;
}

.search-results-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.2s;
}

.search-results-close:hover {
  color: #c0392b;
}

.search-results-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* شبكة النتائج */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.result-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.result-card:hover {
  background: #f8fafc;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.result-card h4 {
  margin: 0 0 8px 0;
  color: #1e3a5f;
  font-size: 1rem;
}

.result-card p {
  margin: 6px 0;
  font-size: 0.85rem;
  color: #475569;
}

.result-card .badge {
  display: inline-block;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  margin-top: 8px;
}

/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/
/*=================== الخريطة إدارة الاملاك ===*/

.map-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.map-modal-content {
    background: var(--card-bg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
    position: relative;
    cursor: grab;
    user-select: none;
}

.map-modal-header {
    padding: 20px 28px;
    background: var(--primary-dark);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-map-modal {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */
/* ========== قسم المالية - كلاسات خاصة ========== */

.finance-nav-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
}

.finance-tab-btn {
  background: none;
  border: none;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 40px;
  transition: all 0.2s;
}


.finance-tab-btn:hover {
  background: #f1f5f9;
  color: #1e3a5f;
}

.finance-tab-btn.active {
  background: #1e3a5f;
  color: white;
}

.finance-tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
}

.finance-tab-content.active {
  display: block;
}

.finance-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.finance-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  text-align: center;
}

.finance-card h3 {
  margin: 0 0 8px 0;
  color: #475569;
  font-size: 0.9rem;
}

.finance-card .amount {
  font-size: 2rem;
  font-weight: 800;
  color: #1e3a5f;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.finance-table th,
.finance-table td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
}

.finance-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #1e3a5f;
}

.finance-table tr:hover {
  background: #f8fafc;
}

.finance-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
}

.finance-status-paid {
  background: #dcfce7;
  color: #15803d;
}

.finance-status-pending {
  background: #fef9c3;
  color: #854d0e;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* قسم المالية - كلاسات فريدة لتجنب التعارض */
.finance-dashboard {
  padding: 20px;
  direction: rtl;
  font-family: inherit;
}

.finance-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.finance-stat-card {
  background: linear-gradient(135deg, #1e3a5f, #0f2a44);
  color: white;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.finance-stat-card i {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}

.finance-stat-value {
  font-size: 1.8rem;
  font-weight: bold;
}

.finance-stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.finance-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
}

.finance-tab-btn.active {
  color: #1e3a5f;
  border-bottom: 2px solid #1e3a5f;
  font-weight: bold;
}

.finance-tab-content {
  display: none;
}


.finance-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.finance-table th,
.finance-table td {
  padding: 12px 15px;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
}

.finance-table th {
  background: #f8fafc;
  font-weight: bold;
  color: #1e3a5f;
}

.finance-table tr:hover {
  background: #f1f5f9;
}

.finance-tab-btn.active {
  background: #2c3e66;
  color: white;
}
.finance-tab-content {
  display: none;
}


/* ========== قسم المالية ========== */
#finance {
  background: #f9fafb;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.finance-tab-btn i {
  font-size: 1.1rem;
}

.finance-tab-btn:hover {
  background: #eef2ff;
  color: #1e3a8a;
}

.finance-tab-btn.active {
  background: #1e3a8a;
  color: white;
  box-shadow: 0 4px 10px rgba(30,58,138,0.2);
}

/* محتوى التبويب */
.finance-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* بطاقات الإحصائيات (مشابهة لبطاقات العقارات) */
.finance-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.finance-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #eef2ff;
}

.finance-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.finance-card h3 {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-card .amount {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1e3a8a;
  direction: ltr;
  text-align: left;
}

/* الجداول */
.finance-table {
  width: 100%;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border-collapse: collapse;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.finance-table th {
  background: #f1f5f9;
  padding: 14px 12px;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
}

.finance-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.finance-table tr:hover td {
  background: #f8fafc;
}

/* شارات الحالة */
.finance-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}
.finance-status-paid {
  background: #dcfce7;
  color: #15803d;
}
.finance-status-pending {
  background: #fef9c3;
  color: #854d0e;
}



/*========================== تنسق الازار العلوية =======/*

/* ========== الشريط العلوي (brand) ========== */
.brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, #0f2a44 0%, #1e3a5f 100%);
    padding: 8px 24px;
    border-radius: 60px;
    margin-bottom: 28px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand > span {
  font-size: 1.3rem;
  font-weight: bold;
  color: white;
  letter-spacing: 0.5px;
  margin-left: 0;
}

/* حاوية الأزرار (تأخذ المساحة المتاحة وتدفع قائمة المستخدم لليسار) */
.brand .buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

/* تنسيق جميع الأزرار داخل brand */
.brand button {
  /*display: inline-flex !important;*/
  display: inline-flex;
  
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: none;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.brand button i {
  font-size: 1rem;
  transition: transform 0.2s;
}

.brand button:hover {
  background: #ffd966;
  color: #0f2a44;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.brand button:hover i {
  transform: scale(1.05);
  color: #0f2a44;
}

/* زر المالية بلون مميز */
/* زر القائمة التصنيف */
.brand .blacklist-btn {
  background: rgba(220, 53, 69, 0.2);
  border-left: 2px solid #dc3545;
}

.brand .blacklist-btn:hover {
  background: #dc3545;
  color: white;
}

/* ========== قائمة المستخدم المنسدلة ========== */
.user-dropdown {
  position: relative;
  margin-right: auto; /* يدفع القائمة إلى أقصى اليسار في الوضع العربي */
  min-width: 160px;
  display: inline-block;
  text-align: center;
  order: 3;
  width: max-content;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  padding: 6px 16px;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}

.user-info:hover {
  background: #ffd966;
  color: #0f2a44;
}

.user-info i:first-child {
  font-size: 1.3rem;
}

.user-info span {
  font-weight: 500;
  font-size: 0.9rem;
}

.user-info i:last-child {
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.user-dropdown.open .user-info i:last-child {
  transform: rotate(180deg);
}

/* القائمة المنسدلة */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: white;
  min-width: 220px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
  direction: rtl;
}

.user-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.dropdown-header strong {
  display: block;
  color: #1e3a5f;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.dropdown-header span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  word-break: break-all;
}

.dropdown-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  cursor: pointer;
  transition: background 0.2s;
  border-top: 1px solid #f1f5f9;
}

.dropdown-item:first-of-type {
  border-top: none;
}

.dropdown-item:hover {
  background: #fef9e6;
  color: #dc2626;
}

.dropdown-item i {
  width: 20px;
  font-size: 1rem;
}

.action-cell {
  text-align: center;
  width: 50px;
}
.btn-view-details, .btn-view-contract, .btn-view-sale, .btn-view-transaction {
  background: var(--primary, #1e3a5f);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 6px 12px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.8rem;
}
.btn-view-details:hover, .btn-view-contract:hover, .btn-view-sale:hover, .btn-view-transaction:hover {
  background: var(--accent, #e67e22);
  transform: scale(1.05);
}

.recent-date-range {
    font-size: 0.8rem;
    color: #475569;
    padding: 0px 10px;
}

.recent-item:hover {
    background-color: #e67e2242;
}

/* ========== استجابة للشاشات الصغيرة ========== */
@media (max-width: 1200px) {
  .brand {
    border-radius: 28px;
    padding: 12px 20px;
  }
  .brand > span {
    width: 100%;
    text-align: center;
    margin-bottom: 6px;
  }
  .brand .buttons-wrapper {
    order: 2;
    width: 100%;
    justify-content: center;
  }

  .user-info {
    justify-content: center;
  }
  .dropdown-menu {
    left: auto;
    right: 0;
    width: 100%;
  }
}

/* تحسين للشاشات الصغيرة جداً */
@media (max-width: 700px) {
  .brand button {
    padding: 6px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .user-info span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


.dropdown-menu.show {
  display: block !important;
}

.user-dropdown .dropdown-menu.show ~ .user-info i:last-child,
.user-dropdown:has(.dropdown-menu.show) .user-info i:last-child {
  transform: rotate(180deg);
}

.containerfinance {
    margin: 0 auto 40px;
    padding: 0 20px;
    display: grid;
    max-width: 1400px;
}


.finance-date-filter {
    align-items: flex-end;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px;
    background: #f9fafc;
    padding: 20px;
    border: 1px solid var(--border-light);
    grid-column: 1 / -1;
    align-items: center;
}

.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.date-filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}
.date-filter-input {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.85rem;
  min-width: 160px;
}
.date-filter-btn, .date-filter-reset {
  padding: 8px 20px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.date-filter-btn {
  background: #1e3a5f;
  color: white;
}
.date-filter-btn:hover {
  background: #0f2a44;
  transform: translateY(-2px);
}
.date-filter-reset {
  background: #e2e8f0;
  color: #334155;
}
.date-filter-reset:hover {
  background: #cbd5e1;
}


/* =============================================
   CSS خاص بقسم إدارة المستخدمين (users-section)
   جميع الكلاسات تبدأ بـ users- لضمان عدم التضارب
   ============================================= */
/* =============================================
   CSS خاص بقسم إدارة المستخدمين (users-section)
   جميع الكلاسات تبدأ بـ users- لضمان عدم التضارب
   ============================================= */
/* =============================================
   CSS خاص بقسم إدارة المستخدمين (users-section)
   جميع الكلاسات تبدأ بـ users- لضمان عدم التضارب
   ============================================= */
/* =============================================
   CSS خاص بقسم إدارة المستخدمين (users-section)
   جميع الكلاسات تبدأ بـ users- لضمان عدم التضارب
   ============================================= */

/* تنسيق الحاوية الرئيسية لقسم المستخدمين */
.users-content-section,
#users-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* عنوان القسم */
#users-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1e293b;
    border-right: 5px solid #3b82f6;
    padding-right: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* زر إضافة مستخدم جديد */
.users-open-modal-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.users-open-modal-btn:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* الجدول */
.users-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.users-table thead tr {
    background-color: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
}

.users-table th {
    background: #1A4D7A;
    color: white;
    font-weight: 700;
    padding: 16px;
    text-align: center;
}

.users-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #E5E9F0;
    text-align: center;
}

.role-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.85rem;
    background: #E3F2FD;
    color: #1976D2;
    border: 1px solid #1976D2;
}

.role-badge.marketer {
    background: #27AE60;
    color: white;
    border-color: #27AE60;
}

.role-badge.agencyAdmin {
    background: #E67E22;
    color: white;
    border-color: #E67E22;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.85rem;
}


.status-active {
    background: #E8F5E9;
    color: #27AE60;
    border: 1px solid #27AE60;
}

.status-suspended {
    background: #FEE;
    color: #C0392B;
    border: 1px solid #C0392B;
}


/*======= الازارار =====*/

.users-action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;  
}

.users-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;  
}

/* أزرار الإجراءات داخل الجدول */
/* أزرار الإجراءات داخل الجدول */


.users-action-btn.toggle {
    background: #F39C12;
    color: white;
}

.users-action-btn.edit {
    background: #1A4D7A;
    color: white;
}

.users-action-btn.delete {
    background: #C0392B;
    color: white;
}



/* ========== الموديلات (النوافذ المنبثقة) ========== */
.users-modal {
    display: none;
    background-color: white;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: usersFadeIn 0.2s ease-out;
    direction: rtl;
}

.btn-primary {
    background: #E67E22;
    color: white;
    box-shadow: 0 4px 10px rgba(230,126,34,0.3);
}

.users-modal-content {
    padding: 25px 20px 20px;
    position: relative;
}

.users-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0f172a;
    font-size: 1.4rem;
    text-align: center;
}

/* زر الإغلاق (X) */
.users-close-modal {
    position: absolute;
    left: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    transition: 0.2s;
}

.users-close-modal:hover {
    color: #ef4444;
}

/* حقول النماذج داخل الموديلات */
.users-modal form input,
.users-modal form select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: 0.2s;
}

.users-modal form input:focus,
.users-modal form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.users-modal form button[type="submit"] {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.users-modal form button[type="submit"]:hover {
    background-color: #2563eb;
}

/* أزرار إضافية داخل موديل الحذف */
#users-confirm-delete {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    margin-left: 10px;
}

.users-cancel-delete {
    background-color: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
}

/* خلفية الموديل */
#users-modal-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}


    .pageusers-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 25px;
    }

    .pageusers-header h2 {
      color: #0B2A4A;
      font-size: 1.8rem;
      font-weight: 900;
    }

/* حركة ظهور الموديل */
@keyframes usersFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* جعل الجدول responsive */
@media (max-width: 768px) {
    .users-table thead {
        display: none;
    }
    .users-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
    }
    .users-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid #f1f5f9;
    }
    .users-table td::before {
        content: attr(data-label);
        font-weight: bold;
        width: 40%;
    }
}

/*=======================*/

/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/
/*============== Dashboard styles ================*/

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  padding: 1.2rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
  transition: 0.2s;
}
.stat-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-dark);
}
.stat-label {
  color: #64748b;
  font-size: 0.85rem;
}
.dashboard-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.dashboard-card {
  background: white;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.full-width {
  grid-column: 1 / -1;
}
.recent-list {
  max-height: 400px;
  overflow-y: auto;
}
.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
  flex-wrap: wrap;
}
.recent-type {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: bold;
}
.recent-type.property { background: #dbeafe; color: #1e3a8a; }
.recent-type.request { background: #dcfce7; color: #166534; }
.recent-title { font-weight: 500; flex: 2; }
.recent-date { color: #64748b; font-size: 0.8rem; }
.recent-date.danger { color: #dc2626; font-weight: bold; }
.recent-tenant, .recent-amount { font-size: 0.85rem; color: #475569; }
.expiring { background: #fef2f2; }
@media (max-width: 768px) {
  .dashboard-two-columns { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

.stat-card { background: white; padding: 1.2rem; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); text-align: center; }
.stat-card i { font-size: 2rem; color: var(--accent); margin-bottom: 0.5rem; }
.stat-value { font-size: 1.8rem; font-weight: bold; color: var(--primary-dark); }
.dashboard-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.dashboard-card { background: white; border-radius: 20px; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.dashboard-card h3 {
    margin-top: 0;
    border-bottom: 2px solid #ffffff;
    background-color: #374f6d;
    color: #ffffff;
    text-align: center;
    border-radius: 7px;
    padding: 0.5rem;
}


.full-width { grid-column: 1 / -1; }
.recent-list { max-height: 400px; overflow-y: auto; }
.recent-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #f1f5f9; gap: 10px; flex-wrap: wrap; }
.recent-type { background: #e2e8f0; padding: 2px 8px; border-radius: 30px; font-size: 0.7rem; }
.recent-type.property { background: #dbeafe; color: #1e3a8a; }
.recent-type.request { background: #dcfce7; color: #166534; }
.recent-date.danger { color: #dc2626; font-weight: bold; }
.expiring { background: #fef2f2; }
@media (max-width: 768px) { .dashboard-two-columns { grid-template-columns: 1fr; } }


/* Dashboard filters */
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: #f8fafc;
  padding: 1rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.filter-group label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #1e293b;
}
.filter-group select, .filter-group input {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: white;
}
.btn-reset-filters {
  background: #64748b;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-reset-filters:hover {
  background: #475569;
}



/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */
/* مؤشر التحميل في لوحة التحكم */


/* ============================================ */
/* تنسيق رأس لوحة التحكم وشريط الفلاتر        */
/* ============================================ */

.filter-wrapper {
  margin-bottom: 0px;
  padding: 1rem 0;
}

.filter-wrapper h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark, #1e3a5f);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-wrapper h2 i {
  color: var(--accent, #e67e22);
  font-size: 1.8rem;
}

.filter-wrapper p {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

#dashboardUserName {
  font-weight: 700;
  color: var(--primary-dark, #1e3a5f);
}

#dashboardAgencyName {
  font-weight: 600;
  color: var(--accent, #e67e22);
}

/* ===== شريط الفلاتر ===== */
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  background: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f6;
  margin-top: 0.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 160px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label i {
  color: var(--accent, #e67e22);
  width: 18px;
  font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fefefe;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent, #e67e22);
  box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
}

.btn-reset-filters {
  background: #f1f5f9;
  color: #1e293b;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 0.2rem;
}

.btn-reset-filters i {
  font-size: 0.9rem;
}

.btn-reset-filters:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* تحسين التجاوب للشاشات الصغيرة */
@media (max-width: 768px) {
  .dashboard-filters {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }
  .filter-group {
    width: 100%;
  }
  .btn-reset-filters {
    justify-content: center;
    margin-top: 0.5rem;
  }
  .filter-wrapper h2 {
    font-size: 1.4rem;
  }
}

/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */
/* تنسيق جدول جهات الاتصال */

/* ==================== قسم جهات الاتصال ==================== */
#content-contacts {
  direction: rtl;
  font-family: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
}

/* بطاقة الجدول */
#content-contacts .card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

#content-contacts .card-body {
  padding: 20px;
}

/* حقل البحث */
#contactsSearchInput {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  transition: all 0.2s;
  font-size: 1rem;
}
#contactsSearchInput:focus {
  border-color: #3b82f6;
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* الجدول */
.contacts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  border-radius: 16px;
  overflow: hidden;
}

.contacts-table thead th {
  background: #1e293b;
  color: white;
  padding: 14px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 2px solid #334155;
}

.contacts-table tbody tr {
  transition: background 0.2s, transform 0.1s;
}

.contacts-table tbody tr:hover {
  background: #f1f5f9;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contacts-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

/* تلوين الأدوار في عمود "الدور / العلاقة" */
.contacts-table td:nth-child(3) {
  font-weight: 500;
  text-align: center;
}

/* ألوان حسب النص (باستخدام CSS فقط - تعتمد على الكلمات المفتاحية) */
.contacts-table td:nth-child(3):contains("بائع") { color: #16a34a; }
.contacts-table td:nth-child(3):contains("مسوق") { color: #2563eb; }
.contacts-table td:nth-child(3):contains("مستأجر") { color: #d97706; }
.contacts-table td:nth-child(3):contains("مشتري") { color: #dc2626; }
.contacts-table td:nth-child(3):contains("طالب شراء") { color: #8b5cf6; }
.contacts-table td:nth-child(3):contains("مالك") { color: #0f172a; }

/* ألوان لصفوف محددة بناءً على الدور (باستخدام JS - البديل الأفضل) */
/* سنقوم بإضافة class للصف عبر JavaScript لضمان التلوين */
.contacts-table tr.role-buyer { background-color: #fef2f2; border-right: 4px solid #dc2626; }
.contacts-table tr.role-seller { background-color: #f0fdf4; border-right: 4px solid #16a34a; }
.contacts-table tr.role-marketer { background-color: #eff6ff; border-right: 4px solid #2563eb; }
.contacts-table tr.role-tenant { background-color: #fffbeb; border-right: 4px solid #d97706; }
.contacts-table tr.role-requester { background-color: #f5f3ff; border-right: 4px solid #8b5cf6; }
.contacts-table tr.role-owner { background-color: #f8fafc; border-right: 4px solid #0f172a; }

/* تنسيق أزرار التفاصيل */
.btn-source-detail {
  background: #eef2ff;
  border: none;
  border-radius: 30px;
  padding: 5px 12px;
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1e40af;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-source-detail i {
  font-size: 0.7rem;
}
.btn-source-detail:hover {
  background: #dbeafe;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* تنسيق خلية المصادر */
.sources-cell {
  max-width: 350px;
  word-break: break-word;
  white-space: normal;
  line-height: 1.7;
}
.sources-cell > div {
  margin-bottom: 8px;
  padding: 4px 0;
  border-radius: 12px;
  transition: background 0.2s;
}
.sources-cell > div:hover {
  background: #fef9c3;
}

/* شريط التمرير */
#content-contacts .card-body > div:last-child {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
#content-contacts .card-body > div:last-child::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
#content-contacts .card-body > div:last-child::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
#content-contacts .card-body > div:last-child::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
/* تلوين الكلمات المفتاحية داخل عمود الأدوار */
.role-keyword {
  display: inline-block;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 2px 4px;
  white-space: nowrap;
}

.role-keyword.buyer { background: #fee2e2; color: #b91c1c; }      /* مشتري */
.role-keyword.seller { background: #dcfce7; color: #15803d; }     /* بائع */
.role-keyword.marketer { background: #dbeafe; color: #1d4ed8; }   /* مسوق */
.role-keyword.tenant { background: #fef3c7; color: #b45309; }     /* مستأجر */
.role-keyword.requester { background: #e9d5ff; color: #6b21a5; }  /* طالب شراء */
.role-keyword.owner { background: #e2e8f0; color: #1e293b; }      /* مالك */
.role-keyword.default { background: #f1f5f9; color: #334155; }     /* أي دور آخر */



/*================== تجميل راس الصفحة ======/* 


/* =============================================
   تنسيق الشريط العلوي (Brand Bar) - نسخة موحدة
   ============================================= */

/* أيقونة واسم الوكالة */
.brand > i.fa-building {
    font-size: 1.8rem;
   /* color: #ffd966;*/
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    margin-left: 8px;
}

#agencyName {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd89b, #c7e9fb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-left: auto; /* لدفع الأزرار لليمين */
}

/* حاوية الأزرار */
.buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    justify-content: flex-start;
    margin: 0 15px;
}

/* تنسيق جميع الأزرار داخل .brand */
.brand button,
.buttons-wrapper button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}

.brand button:hover,
.buttons-wrapper button:hover {
    background: #ffc107;
    color: #0f2a44;
    border-color: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.brand button:hover i,
.buttons-wrapper button:hover i {
    color: #0f2a44;
    transform: scale(1.05);
}

/* ألوان جانبية مميزة لكل زر (اختياري - تعمل مع الخلفية القديمة) */

/* ========== قائمة المستخدم المنسدلة ========== */
.user-dropdown {
    position: relative;
    min-width: 180px;
    margin-right: auto; /* لدفعها إلى أقصى اليسار في RTL */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.user-info:hover {
    background: #ffc107;
    color: #1e2b3c;
}

.user-info i:first-child {
    font-size: 1.3rem;
}

.user-info span {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-info .fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.user-dropdown.open .user-info .fa-chevron-down {
    transform: rotate(180deg);
}

/* القائمة المنسدلة */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
    direction: rtl;
}

.user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-header strong {
    display: block;
    color: #1e3a5f;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.dropdown-header span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    word-break: break-all;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s;
    border-top: 1px solid #f1f5f9;
}

.dropdown-item:first-of-type {
    border-top: none;
}

.dropdown-item:hover {
    background: #fef9e6;
    color: #dc2626;
}

.dropdown-item i {
    width: 20px;
    font-size: 1rem;
}

/* ========== تحسين استجابة الشاشات ========== */
@media (max-width: 1200px) {
    .brand {
        border-radius: 28px;
        padding: 12px 20px;
      /*  flex-direction: column;*/
        gap: 12px;
    }
    #agencyName {
        margin-left: 0;
        text-align: center;
        width: max-content;
    }
    .buttons-wrapper {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    .user-dropdown {
        order: 3;
        width: 100%;
        margin-right: 0;
    }

    .user-info {
        justify-content: center;
    }
    .dropdown-menu {
        left: auto;
        right: 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .brand button,
    .buttons-wrapper button {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    #agencyName {
        font-size: 1.2rem;
    }
    .user-info span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== *//* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== */
/* ===========================================
   تحويل الأزرار إلى مربعات في الجوال
   =========================================== */
/* ===========================================
   قائمة الجوال المربعات (تظهر فقط تحت 768px)
   =========================================== */
/* ===========================================
   قائمة الجوال المربعات (نسخة نهائية)
   =========================================== */
/* =============================================
   تحويل الأزرار إلى مربعات في الجوال فقط
   ============================================= */

/* ============================================
   زر القائمة للجوال
   ============================================ */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    margin-left: 10px;
    z-index: 3000;
  }
}

/* ============================================
   القائمة الجانبية للجوال
   ============================================ */
@media (max-width: 768px) {
  .buttons-wrapper {
    position: fixed !important;
    top: 0;
    right: -280px; /* مخفية على اليمين (RTL) */
    width: 260px !important;
    height: 100% !important;
    background: #1e2b3c !important;
    z-index: 2000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 70px 15px 20px !important;
    transition: right 0.3s ease !important;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2) !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  
  /* عند فتح القائمة */
  .buttons-wrapper.open {
    right: 0 !important;
  }

  /* تنسيق الأزرار داخل القائمة */
  .buttons-wrapper button {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    color: white !important;
    text-align: right !important;
    font-weight: normal !important;
    margin: 0 !important;
  }

  .buttons-wrapper button i {
    font-size: 1.3rem !important;
    color: #ffc107 !important;
    width: 30px;
    text-align: center;
    margin: 0 !important;
  }
/*
  .buttons-wrapper button:hover {
    background: rgba(255,255,255,0.1) !important;
  }
*/
  /* زر إغلاق القائمة */
  .close-sidebar-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
  }

  /* الحاجب الخلفي */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
    pointer-events: none; /* لا يمنع النقر على الأزرار */
  }
  .sidebar-overlay.active {
    display: block;
  }
}

/* ============================================
   سطح المكتب: الأزرار العلوية الطبيعية
   ============================================ */
@media (min-width: 769px) {
  .mobile-menu-toggle,
  .close-sidebar-btn {
    display: none !important;
  }

  .brand {
    display: flex;
    flex-direction: row;
    align-items: center;
}

#agencyName {
    margin-left: 0px;
    text-align: center;
    width: max-content;
}

}
@media (max-width: 768px) {

.users-table tr {
    display: flex;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(230,126,34,0.3);
}

h2 {
    font-size: 1.3rem;
}

.pageusers-header h2 {
    font-size: 0;
}

.estate-header h2 {
    font-size: 1.3rem;
}

.property-title {
    font-size: 1.3rem;
}

.finance-date-filter.specs-group label {
    display: none;
}

.finance-date-filter.specs-group {
    display: flex;
    flex-wrap: wrap;
}

.finance-table tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(230,126,34,0.3);
    margin: 15px 0;
}

.finance-table thead {
    display: none;
}

.finance-nav-buttons {
    flex-direction: column;
}

}

.sidebar-overlay {
  display: none !important;
}
/*======================*/



/*================= لمسة جمالية على طريقة الدفع =====*/
/*================= لمسة جمالية على طريقة الدفع =====*/
/*================= لمسة جمالية على طريقة الدفع =====*/

/* --- تحسينات عامة لقسم استعراض العقارات --- */
#content-properties-grid {
    padding: 20px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.luxury-cat-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.luxury-cat-btn .icon-box {
    width: 35px;
    height: 35px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.1rem;
    transition: 0.3s;
}

.luxury-cat-btn span {
    font-weight: 700;
    color: #475569;
    font-size: 0.95rem;
}

/* تأثير التمرير (Hover) */
.luxury-cat-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-dark);
}

/* حالة الزر النشط (Active) */
.luxury-cat-btn.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.luxury-cat-btn.active span {
    color: #ffffff;
}

.luxury-cat-btn.active .icon-box {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* --- تصميم بطاقة الجدول (The Glass Card) --- */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

/* --- شريط الرأس داخل البطاقة --- */
.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.title-group h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.count-indicator {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.count-number {
    color: var(--primary-dark);
    font-weight: 900;
    font-size: 1.1rem;
}

/* --- تصميم الجدول الفاخر (Premium Table) --- */
.modern-table-wrapper {
    border-radius: 20px;
    overflow: hidden;
}

/* --- تصميم زر الإجراء (Action Button) --- */
.btn-view-details {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #334155 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-view-details:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    filter: brightness(1.2);
}

/* --- حالات فارغة (Empty States) --- */
.empty-table-state {
    text-align: center;
    padding: 80px 0;
}

.empty-msg i {
    font-size: 4rem;
    background: linear-gradient(to bottom, #cbd5e1, #f1f5f9);
   /* -webkit-background-clip: text;*/
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

/* --- تحسين التجاوب (Responsive) --- */
@media (max-width: 768px) {
    .luxury-category-buttons {
        gap: 10px;
    }
    .luxury-cat-btn {
        padding: 10px 15px;
        flex: 1 1 40%; /* زرين في كل صف على الجوال */
    }
}

/* تنسيق الزر عند الاختيار */
.luxury-cat-btn.active {
    background: var(--primary-dark, #1e3a8a); /* لون الخلفية عند الاختيار */
    border-color: #d4af37; /* إطار ذهبي خفيف */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2);
}

.luxury-cat-btn.active span {
    color: #ffffff !important; /* نص أبيض ليبرز على الخلفية الغامقة */
}

.luxury-cat-btn.active .icon-box {
    background: #d4af37 !important; /* لون ذهبي لصندوق الأيقونة */
    color: #ffffff !important;
}

/* تنسيق عنوان القائمة ليظهر بلون متميز */
#tableCategoryTitle {
    color: var(--primary-dark, #1e3a8a);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

/* تمييز كلمة التصنيف داخل العنوان */
#tableCategoryTitle span.category-name {
    color: var(--accent); /* جعل اسم العقار باللون الذهبي */
    padding: 0 5px;
}

/* تنسيقات خاصة فقط بصفحة عرض العقارات في الجوال */
@media screen and (max-width: 768px) {
    
    /* جعل حاوية الأزرار قابلة للتمرير العرضي */
    #content-properties-grid .luxury-category-buttons {
        display: flex;
        overflow-x: auto;
        padding: 15px;
        gap: 12px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        align-items: center;
        flex-wrap: wrap;
    }

    #content-properties-grid .luxury-cat-btn {
        flex: 0 0 auto; /* منع انكماش الأزرار */
        min-width: 120px;
    }

    /* تحويل الجدول إلى نظام البطاقات */
    #content-properties-grid .premium-table thead {
        display: none; /* إخفاء رؤوس الجدول */
    }

    #content-properties-grid .premium-table, 
    #content-properties-grid .premium-table tbody, 
    #content-properties-grid .premium-table tr, 
    #content-properties-grid .premium-table td {
        display: block;
        width: 100%;
    }

    #content-properties-grid .premium-table tr {
        background: #fff;
        margin-bottom: 20px;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        border: 1px solid #eef2f3;
        overflow: hidden;
    }

    #content-properties-grid .premium-table td {
        padding: 12px 20px;
        text-align: right;
        border-bottom: 1px solid #f8f9fa;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* إضافة مسميات للبيانات داخل البطاقة */
    #content-properties-grid .premium-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #94a3b8;
        font-size: 12px;
    }

    /* تنسيق الخلية الأولى (العنوان) لتظهر بشكل مميز */
    #content-properties-grid .premium-table td:first-child {
        background: #fdfdfd;
        flex-direction: column;
        align-items: flex-start;
    }
    
    #content-properties-grid .premium-table td:first-child::before {
        margin-bottom: 5px;
    }

    /* زر الإجراء في الأسفل */
    #content-properties-grid .premium-table td:last-child {
        border-bottom: none;
        padding: 15px;
        background: #fafafa;
    }

    #content-properties-grid .btn-view-details {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}



/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/
/*====== لأزرار الاسترجاع ======*/


.btn-refund-receipt {
  background-color: #e67e22;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 5px;
  transition: all 0.3s ease;
}

.btn-refund-receipt:hover {
  background-color: #d35400;
  transform: translateY(-2px);
}

.action-cell {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

/* تنسيق خاص للسندات المسترجعة */
.receipt-refunded {
  opacity: 0.7;
  background-color: #fef5e7;
}

.refund-badge {
  background-color: #e67e22;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  margin-right: 8px;
}

/* تنسيق حقول منفذ الاسترجاع */
#refundExecutor {
  background-color: #fff3e0;
  border: 2px solid #e67e22;
}

#refundExecutor:focus {
  border-color: #d35400;
  box-shadow: 0 0 5px rgba(230, 126, 34, 0.3);
}

/* تمييز حقول المنفذين */
.form-group label:has(+ input#refundOriginalExecutor) {
  color: #2c3e50;
  font-weight: bold;
}

.form-group label:has(+ input#refundExecutor) {
  color: #e67e22;
  font-weight: bold;
}


.custom-alert-body {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.8;
  padding: 8px 0;
}

.custom-alert-body strong {
  color: #e67e22;
}

.custom-alert-body .receipt-number {
  color: #2980b9;
  font-weight: bold;
  font-size: 16px;
}

.custom-alert-body .executor-name {
  color: #27ae60;
  font-weight: bold;
}

.custom-alert-body .warning-text {
  color: #e74c3c;
  font-weight: bold;
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}


/* تنسيق السندات المسترجعة */
.receipt-refunded-row {
  background-color: #fef5e7 !important;
  border-right: 4px solid #e67e22;
  opacity: 0.85;
  transition: all 0.3s ease;
}

.receipt-refunded-row:hover {
  opacity: 1;
  background-color: #fdebd0 !important;
}

.refund-badge {
  display: inline-block;
  background: #e67e22;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 8px;
}

.refund-receipt-badge {
  display: inline-block;
  background: #d35400;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 8px;
}

/* تنسيق نص السند المسترجع في الجدول */
.refunded-text {
  color: #e67e22;
  font-weight: bold;
  text-decoration: line-through;
  text-decoration-color: #e67e22;
}


/* السند العادي - لون عادي */
.normal-receipt-row {
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.normal-receipt-row:hover {
  background-color: #f5f5f5;
}

/* السند الأصلي المسترجع - لون برتقالي فاتح */
.original-refunded-row {
  background-color: #fff3e0 !important;
  border-right: 4px solid #e67e22;
  opacity: 0.9;
}

.original-refunded-row:hover {
  background-color: #fdebd0 !important;
  opacity: 1;
}

/* سند الاسترجاع - لون برتقالي غامق */
.refund-receipt-row {
  background-color: #fdebd0 !important;
  border-right: 4px solid #d35400;
}

.refund-receipt-row:hover {
  background-color: #f5d6c6 !important;
}

/* الشارات */
.refunded-badge {
  display: inline-block;
  background: #e67e22;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  margin-right: 8px;
}

.refund-badge {
  display: inline-block;
  background: #d35400;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  margin-right: 8px;
}


/* =============================================
   أزرار شريط الأدوات في قسم استعراض العقارات
   ============================================= */

/* ============================================
   أزرار شريط الأدوات (إضافة عقار + خريطة)
   ============================================ */

.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.action-buttons-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.grid-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.grid-action-btn i {
    font-size: 1rem;
}

/* زر الإضافة */
.grid-action-btn.add-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.grid-action-btn.add-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #059669, #047857);
}

/* زر الخريطة */
.grid-action-btn.map-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.grid-action-btn.map-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* للشاشات المتوسطة */
@media (max-width: 768px) {
    .card-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .grid-action-btn {
        padding: 7px 16px;
    }
}

/* للشاشات الصغيرة جداً - إخفاء النص */
@media (max-width: 480px) {
    .grid-action-btn span {
        display: none;
    }
    
    .grid-action-btn {
        padding: 8px;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
    
    .grid-action-btn i {
        margin: 0;
        font-size: 1rem;
    }
}


/* ============================================
   إصلاح تنسيق التصنيفات - CSS فقط
   ============================================ */

/* حاوية الأزرار الرئيسية */
.main-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
  /*  margin-bottom: 20px;*/
    flex-wrap: wrap;
}

/* الأزرار الرئيسية */
.main-cat-btn {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 60px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
}

.main-cat-btn .icon-box {
    width: 34px;
    height: 34px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-cat-btn.active {
    background: linear-gradient(135deg, #1e3a5f, #0f2a44);
    border-color: #d4af37;
    color: white;
}

.main-cat-btn.active .icon-box {
    background: #d4af37;
    color: #1e3a5f;
}

/* التصنيفات الفرعية */
.sub-categories {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 24px;
    padding: 16px 20px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ============================================
   الأزرار الفرعية - نسخة موحدة
   ============================================ */

/* الأزرار الفرعية (قاعدة موحدة للجميع) */
.sub-cat-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
}

.sub-cat-btn i {
    font-size: 0.85rem;
    color: #64748b;
}

.sub-cat-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

/* ============================================
   حالة التحديد (active) - موحدة
   ============================================ */
.sub-cat-btn.active {
    background: linear-gradient(135deg, #1e3a5f, #0f2a44);
    border-color: #d4af37;
    color: white;
}

.sub-cat-btn.active i {
    color: #d4af37;
}

/* ============================================
   تلوين خاص لأزرار الأراضي (فقط)
   ============================================ */

/* hover لأزرار الأراضي */
.sub-cat-btn[data-land-type]:hover {
    background: #ecfdf5;
    border-color: #10b981;
}

/* active لأزرار الأراضي */
.sub-cat-btn.active[data-land-type] {
    background: linear-gradient(135deg, #065f46, #047857);
}

/* ============================================
   تلوين خاص لأزرار المباني (فقط)
   ============================================ */

/* hover لأزرار المباني */
.sub-cat-btn[data-building-type]:hover {
    background: #ecfdf5;
    border-color: #10b981;
}

/* active لأزرار المباني (نفس لون الأراضي أو مختلف حسب رغبتك) */
.sub-cat-btn.active[data-building-type] {
    background: linear-gradient(135deg, #065f46, #047857);

}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .main-categories {
        gap: 12px;
    }
    
    .main-cat-btn {
        padding: 7px 8px;
        font-size: 0.85rem;
    }
    
    .main-cat-btn .icon-box {
        width: 28px;
        height: 28px;
    }
    
    .sub-categories {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .sub-cat-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }
}


/* حاوية التصنيفات الرئيسية */
.luxury-category-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

/* التصنيفات الفرعية للأراضي والمباني */
.sub-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* تنسيق الأزرار بشكل متجانس */
.sub-cat-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* للجوال: تصغير الأزرار وجعلها أكثر تجانساً */
@media (max-width: 768px) {
    .sub-categories {
        gap: 6px;
        justify-content: center;
    }
    
    .sub-cat-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .sub-cat-btn i {
        font-size: 0.7rem;
    }
}

/* للشاشات الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
    .sub-categories {
        gap: 5px;
    }
    
    .sub-cat-btn {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
}




#manageEstatesBtn, #openAddPropertyModal, #addRequestBtn {
    display: none !important;
}

/*========  ========*/

/* ============================================
   تحسين عرض جدول الأملاك للجوال
   ============================================ */
/* ===== حل مشكلة جدول الأملاك في الجوال ===== */

/* ===== تحويل جدول الأملاك إلى بطاقات في الجوال ===== */
@media (max-width: 768px) {
  
  /* إخفاء رأس الجدول */
  #estatesTable thead {
    display: none;
  }
  
  /* تحويل كل صف إلى بطاقة */
  #estatesTable tbody tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px;
  }
  
  /* تحويل كل خلية إلى صف أفقي */
  #estatesTable tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: right;
  }
  
  /* إزالة الحد من آخر خلية */
  #estatesTable tbody td:last-child {
    border-bottom: none;
    justify-content: center;
  }
  
  /* إضافة العنوان قبل كل قيمة */
  #estatesTable tbody td:first-child::before {
    content: "📋 معلومات العقار";
    font-weight: bold;
    color: var(--primary-dark);
  }
  
  #estatesTable tbody td:nth-child(2)::before {
    content: "📍 الموقع";
    font-weight: bold;
    color: var(--primary-dark);
  }
  
  #estatesTable tbody td:nth-child(3)::before {
    content: "👤 المالك";
    font-weight: bold;
    color: var(--primary-dark);
  }
  
  #estatesTable tbody td:nth-child(4)::before {
    content: "🏢 الوحدات";
    font-weight: bold;
    color: var(--primary-dark);
  }
  
  #estatesTable tbody td:nth-child(5)::before {
    content: "📅 تاريخ الإضافة";
    font-weight: bold;
    color: var(--primary-dark);
  }
  
  #estatesTable tbody td:last-child::before {
    display: none;
  }
  
  /* تنسيق المحتوى داخل البطاقة */
  #estatesTable tbody td > div,
  #estatesTable tbody td > span {
    text-align: left;
    direction: ltr;
  }
  
  /* تنسيق زر العرض */
  #estatesTable .btn-view-details {
    width: 100%;
    text-align: center;
    padding: 8px;
  }
  
  /* تنسيق شريط الأدوات العلوي */
  .card-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
.action-buttons-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: max-content;
    align-items: center;
    margin: auto;
}
  
  .action-buttons-group button {
    flex: 1;
    justify-content: center;
  }
}


/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */
/* ===== شريط البحث السريع ===== */


.quick-search-bar {
    display: flex;
    gap: 10px;
    /* margin-bottom: 20px; */
    align-items: center;
    flex-wrap: wrap;
    background: white;
    padding: 0px 15px;
    border-radius: 60px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.quick-search-bar i {
  color: var(--accent);
  font-size: 1.2rem;
}

.quick-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 0;
  font-size: 0.9rem;
  background: transparent;
}

.quick-search-bar input::placeholder {
  color: #aaa;
}

.quick-search-bar .clear-search {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 5px;
  display: none;
}

.quick-search-bar .clear-search.visible {
  display: block;
}

.search-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 30px;
}


/* ========================================
   مؤشر التحميل (Loading Spinner)
   ======================================== */

/* تحسين الـ inline style الحالي */
.recent-list > div[style*="text-align: center"] {
  background: #f8fafc;
  border-radius: 16px;
  margin: 15px 0;
}

.recent-list > div[style*="text-align: center"] i {
  font-size: 1.8rem;
  color: #E67E22;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */
/* تلوين الدفعات المتأخرة */

.recent-date.overdue {
  background: #c0392b !important;
  color: white !important;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: bold;
}

.recent-item.overdue-item {
  background: #fee2e2;
  border-right: 4px solid #c0392b;
  animation: pulseWarning 1s infinite;
}

@keyframes pulseWarning {
  0% { background: #fee2e2; }
  50% { background: #fecaca; }
  100% { background: #fee2e2; }
}
