/* تصميم بسيط RTL لنظام مراقبة العقار — بدون أي أدوات بناء خارجية */

:root {
  --brand-50: #eef6f5;
  --brand-100: #d7e9e6;
  --brand-500: #357f72;
  --brand-600: #28655b;
  --brand-700: #22514a;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --emerald-50: #ecfdf5;
  --emerald-700: #047857;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Tahoma', 'Segoe UI', Arial, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  direction: rtl;
}

a { color: inherit; text-decoration: none; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: #fff;
  border-inline-start: 1px solid var(--slate-200);
  border-inline-end: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
}

.sidebar-brand { padding: 20px; border-bottom: 1px solid var(--slate-200); }
.sidebar-brand h1 { margin: 0; font-size: 18px; color: var(--brand-700); }
.sidebar-brand p { margin: 4px 0 0; font-size: 12px; color: var(--slate-500); }

.sidebar nav { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--slate-700); }
.nav-link:hover, .nav-link.active { background: var(--brand-50); color: var(--brand-700); }

.sidebar-logout { padding: 12px; border-top: 1px solid var(--slate-200); }

.content { flex: 1; padding: 32px; max-width: 1100px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.page-header h2 { margin: 0; font-size: 24px; }
.page-header p { margin: 4px 0 0; color: var(--slate-500); font-size: 14px; }

.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  margin-bottom: 20px;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
  border: none; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-secondary { background: var(--slate-100); color: var(--slate-700); }
.btn-secondary:hover { background: var(--slate-200); }
.btn-danger { background: var(--red-50); color: var(--red-700); }
.btn-danger:hover { background: #fee2e2; }
.btn-block { width: 100%; }

form.inline-form { display: inline; }

.label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--slate-700); }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--slate-200); border-radius: 8px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--slate-900);
}
.input:focus { outline: 2px solid var(--brand-500); outline-offset: 0; border-color: var(--brand-500); }
.hint { font-size: 12px; color: var(--slate-400); margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.field { margin-bottom: 16px; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th { text-align: start; background: var(--slate-50); border-bottom: 1px solid var(--slate-200); padding: 10px 12px; font-weight: 600; color: var(--slate-600); }
table.table td { border-bottom: 1px solid var(--slate-100); padding: 10px 12px; vertical-align: middle; }
.table-actions { display: flex; gap: 8px; justify-content: flex-end; }
.table-empty { text-align: center; padding: 32px; color: var(--slate-400); }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.badge-green { background: var(--emerald-50); color: var(--emerald-700); }
.badge-amber { background: var(--amber-50); color: var(--amber-700); }
.badge-red { background: var(--red-50); color: var(--red-700); }
.badge-slate { background: var(--slate-100); color: var(--slate-600); }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: var(--emerald-50); color: var(--emerald-700); }
.alert-error { background: var(--red-50); color: var(--red-700); }

.stat-card { display: block; }
.stat-card .stat-label { font-size: 13px; color: var(--slate-500); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--brand-700); margin-top: 4px; }

.alert-list { padding: 0; }
.alert-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--slate-100); font-size: 14px; }
.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: var(--slate-50); }
.alert-row .title { font-weight: 500; }
.alert-row .subtitle { color: var(--slate-500); font-size: 13px; }
.alert-row .trailing { color: var(--slate-500); }

.property-card { display: block; }
.property-card h3 { margin: 0 0 4px; font-size: 17px; }
.property-card .muted { color: var(--slate-500); font-size: 13px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--slate-50); }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { text-align: center; color: var(--brand-700); margin-bottom: 4px; }
.login-card p.subtitle { text-align: center; color: var(--slate-500); margin-top: 0; margin-bottom: 20px; font-size: 14px; }

.form-max { max-width: 640px; }
