/* ── RESET & TOKENS ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Anglo-Saxon palette — signature red + yellow on white surfaces */
  --navy:       #E30613;
  --navy-dark:  #B10510;
  --navy-mid:   #C90812;
  --navy-light: #F23A42;
  --navy-pale:  #FDE9EA;
  --gold:       #FFD100;
  --gold-deep:  #E6B800;
  --gold-pale:  #FFF7D6;
  --gold-light: #FFE680;
  --bg:         #F6F6F7;
  --surface:    #FFFFFF;
  --border:     #E6E6E9;
  --border-soft:#EFEFF1;
  --text:       #24242A;
  --muted:      #6B6B73;
  --hint:       #9A9AA2;
  --gray-bg:    #F3F3F5;
  --text-muted: #6B6B73;
  --green:      #1B8A3A;
  --green-bg:   #E9F6ED;
  --red:        #C81E1E;
  --red-bg:     #FCEBEB;
  --sidebar-w:  248px;
  --shadow-sm:  0 1px 2px rgba(30,30,35,0.04), 0 1px 3px rgba(30,30,35,0.06);
  --shadow-md:  0 6px 24px rgba(30,30,35,0.08);
  --shadow-lg:  0 18px 48px rgba(30,30,35,0.14);
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Montserrat', 'Inter', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,209,0,0.28);
}
.sidebar-brand {
  padding: 26px 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
}
.sidebar-brand::after {
  content: ''; position: absolute; left: 22px; bottom: -1px;
  width: 34px; height: 2px; background: var(--gold);
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 600; color: #fff; letter-spacing: 1.5px;
}
.brand-name span, .brand-accent { color: var(--gold); }
.brand-sub  { font-size: 9.5px; color: rgba(255,255,255,0.4); margin-top: 5px; text-transform: uppercase; letter-spacing: 2.5px; }

.nav        { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 22px; font-size: 13px; font-weight: 400;
  color: rgba(255,255,255,0.5); cursor: pointer;
  border-left: 2px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  user-select: none;
}
.nav-item:hover  { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--gold-light); border-left-color: var(--gold); background: rgba(180,146,78,0.10); font-weight: 500; }
.nav-item i      { font-size: 18px; width: 20px; text-align: center; }

.sidebar-agent {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 11px;
}
.s-agent-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  border: 1px solid rgba(180,146,78,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.s-agent-name { font-size: 12.5px; font-weight: 500; color: #fff; }
.s-agent-role { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 1px; text-transform: uppercase; letter-spacing: 0.6px; }

/* ── MAIN ─────────────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: 60px; padding: 0 30px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50; flex-shrink: 0;
}
.topbar-left  { display: flex; align-items: baseline; gap: 14px; }
.topbar-title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: 0.3px; }
.topbar-date  { font-size: 12px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.notif-btn {
  position: relative; width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 18px; transition: background 0.15s, border-color 0.15s;
}
.notif-btn:hover { background: var(--navy-pale); border-color: var(--navy-pale); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 2px var(--surface);
}
.topbar-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy-pale); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--navy);
}

/* ── PAGE ─────────────────────────────────────────────────────────────────── */
.page        { display: none; flex: 1; flex-direction: column; }
.page.active { display: flex; }
.page-body   {
  flex: 1; padding: 26px 30px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 17px; border-radius: 10px; font-size: 13px;
  font-weight: 500; cursor: pointer; border: none;
  font-family: inherit; transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s, background 0.15s;
  letter-spacing: 0.2px;
}
.btn:hover    { transform: translateY(-1px); }
.btn:active   { transform: translateY(0); }
.btn-primary  { background: var(--navy); color: #fff; flex: 1; justify-content: center; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-mid); box-shadow: var(--shadow-md); }
.btn-gold     { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%); color: var(--navy-dark); font-weight: 700; box-shadow: 0 2px 8px rgba(255,209,0,0.35); }
.btn-gold:hover { box-shadow: 0 6px 18px rgba(255,209,0,0.45); }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--navy); background: var(--navy-pale); }
.btn-danger   { background: var(--red-bg); color: var(--red); border: 1px solid #f0c4bf; }
.btn-sm       { padding: 6px 13px; font-size: 12px; }
.btn-icon     {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--navy); font-size: 16px;
  transition: background 0.12s, border-color 0.12s;
}
.btn-icon:hover { background: var(--navy-pale); border-color: var(--navy-pale); }

/* ── CARD ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 17px 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}
.card-title { font-family: var(--font-serif); font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.card-body  { padding: 16px 22px; }

/* ── CHIP / FILTER ────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.chip {
  border: 1px solid var(--border); background: transparent;
  border-radius: 20px; padding: 6px 15px; font-size: 12px;
  color: var(--muted); cursor: pointer; font-family: inherit;
  transition: all 0.14s; white-space: nowrap;
}
.chip:hover  { border-color: var(--navy); color: var(--navy); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 500; }

.search-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--gray-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 13px; min-width: 200px;
  transition: border-color 0.15s, background 0.15s;
}
.search-wrap:focus-within { border-color: var(--navy-light); background: #fff; }
.search-wrap input {
  border: none; background: transparent; font-size: 13px; flex: 1;
  outline: none; color: var(--text); font-family: inherit;
}

/* ── HOME ─────────────────────────────────────────────────────────────────── */
.hero-strip {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  border-radius: 18px; padding: 30px 34px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-strip::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}
.hero-strip::after {
  content: ''; position: absolute; right: -50px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,146,78,0.14), transparent 70%);
  pointer-events: none;
}
.hero-greeting { font-family: var(--font-serif); font-size: 26px; font-weight: 600; color: #fff; letter-spacing: 0.3px; }
.hero-sub      { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 5px; }
.stats-pills   { display: flex; gap: 10px; position: relative; z-index: 1; }
.pill {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 13px; padding: 15px 20px; text-align: center; min-width: 92px;
  backdrop-filter: blur(2px);
}
.pill-num { font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: #fff; line-height: 1; }
.pill-lbl { font-size: 10.5px; color: rgba(255,255,255,0.55); margin-top: 5px; letter-spacing: 0.4px; text-transform: uppercase; }

.home-grid  { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.sec-label  { font-size: 10px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 11px; }

/* Tasks */
.task-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.task-item:last-child { border-bottom: none; }
.tdot      { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-navy  { background: var(--navy); }
.dot-gold  { background: var(--gold); }
.dot-red   { background: var(--red); }
.task-text { flex: 1; font-size: 13px; }
.task-time { font-size: 12px; color: var(--muted); }
.task-time.urgent { color: var(--red); font-weight: 600; }
.empty-state { padding: 34px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── NOTIFICATIONS / SWITCH ───────────────────────────────────────────────── */
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--border-soft); }
.notif-name { font-size: 14px; font-weight: 500; color: var(--text); }
.notif-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: var(--border); border-radius: 24px; transition: background 0.18s; }
.switch .slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.switch input:checked + .slider { background: var(--navy); }
.switch input:checked + .slider::before { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + .slider::before { transform: translateX(-18px); }

/* ── LEASE CARD ───────────────────────────────────────────────────────────── */
.lease-card { padding: 16px 18px; }
.lease-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lease-addr { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.lease-addr i { color: var(--navy); font-size: 16px; }
.lease-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.lease-lbl  { font-size: 10px; color: var(--hint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.lease-val  { font-size: 13px; color: var(--text); font-weight: 500; }
.lease-notes { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--muted); }
.lease-actions { margin-top: 12px; display: flex; gap: 8px; }
.lease-actions .btn { text-decoration: none; }
@media (max-width: 620px) { .lease-grid { grid-template-columns: 1fr; } }

/* ── PROP CARD ────────────────────────────────────────────────────────────── */
.props-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.prop-card  {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
  cursor: pointer; transition: box-shadow 0.2s, transform 0.2s; background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.prop-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.prop-img {
  height: 158px; background: linear-gradient(140deg,#C8D5E0,#AEBFCD);
  position: relative; overflow: hidden;
}
.prop-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.prop-card:hover .prop-img img { transform: scale(1.05); }
.prop-img-ph  {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: rgba(20,39,61,0.14);
}
.prop-badge {
  position: absolute; top: 11px; left: 11px;
  background: var(--gold); color: var(--navy-dark); font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 5px; letter-spacing: 0.5px; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.prop-badge-rent { background: var(--navy); color: #fff; }
.prop-body  { padding: 13px 15px; }
.prop-price { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--text); }
.prop-price-sub { font-size: 11px; color: var(--muted); margin: 2px 0 9px; }
.prop-addr  { font-size: 12px; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 4px; }
.prop-meta  { display: flex; gap: 14px; font-size: 11px; color: var(--hint); padding-top: 9px; border-top: 1px solid var(--border-soft); }
.prop-meta span { display: flex; align-items: center; gap: 3px; }

/* ── SHOW ROW ─────────────────────────────────────────────────────────────── */
.show-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.show-row:last-child { border-bottom: none; }
.show-time  { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--navy); min-width: 50px; }
.show-vline { width: 2px; height: 38px; background: var(--gold-light); border-radius: 2px; flex-shrink: 0; }
.show-info  { flex: 1; }
.show-title { font-size: 13px; font-weight: 500; }
.show-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.show-status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 11px; white-space: nowrap; }
.ss-confirmed { background: var(--green-bg); color: var(--green); }
.ss-pending   { background: #FFF3E0; color: #996600; }
.ss-done      { background: #F0F0F0; color: #666; }
.ss-cancelled { background: var(--red-bg); color: var(--red); }

/* ── CLIENT ROW ───────────────────────────────────────────────────────────── */
.client-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 22px; border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s; cursor: pointer;
}
.client-row:last-child { border-bottom: none; }
.client-row:hover { background: var(--gray-bg); }
.client-av   {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--navy);
}
.client-name { font-size: 14px; font-weight: 500; }
.client-sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.client-acts { display: flex; gap: 8px; margin-left: auto; }
.type-badge  { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 11px; white-space: nowrap; }
.type-buyer  { background: var(--navy-pale); color: var(--navy); }
.type-renter { background: var(--gold-pale); color: var(--gold-deep); }
.type-seller { background: var(--green-bg); color: var(--green); }

/* ── CALENDAR ─────────────────────────────────────────────────────────────── */
.week-strip {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 5px;
  padding: 15px 17px; border-bottom: 1px solid var(--border-soft);
}
.week-day { text-align: center; padding: 9px 4px; border-radius: 11px; cursor: pointer; transition: background 0.12s; }
.week-day:hover   { background: var(--navy-pale); }
.week-day.today   { background: var(--navy); box-shadow: var(--shadow-sm); }
.week-day.today .wd-num, .week-day.today .wd-name { color: #fff; }
.wd-name { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.wd-num  { font-family: var(--font-serif); font-size: 18px; font-weight: 500; color: var(--text); margin-top: 3px; }
.wd-dot  { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; margin: 4px auto 0; }
.cal-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }

/* ── PROFILE ──────────────────────────────────────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.profile-header {
  background: linear-gradient(140deg, var(--navy-dark), var(--navy-mid));
  padding: 30px 22px; text-align: center; position: relative; overflow: hidden;
}
.profile-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.profile-av {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 2px solid rgba(180,146,78,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 600; color: #fff; margin: 0 auto 13px;
  font-family: var(--font-serif);
}
.profile-name   { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: #fff; }
.profile-role-t { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }
.profile-badges { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.pbadge         { font-size: 11px; font-weight: 500; padding: 5px 13px; border-radius: 20px; }
.pbadge-navy    { background: rgba(255,255,255,0.12); color: #fff; }
.pbadge-gold    { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2A1E05; }

.info-list     {}
.info-row      { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row-lbl  { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.info-row-val  { font-weight: 500; }

.stat-grid2    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 22px; }
.stat-box      { background: var(--gray-bg); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px; text-align: center; }
.stat-box-n    { font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: var(--navy-dark); }
.stat-box-l    { font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── DETAIL PANEL ─────────────────────────────────────────────────────────── */
.detail-overlay {
  position: fixed; inset: 0; background: rgba(8,18,30,0.42); z-index: 200;
  display: none; justify-content: flex-end; backdrop-filter: blur(2px);
}
.detail-overlay.open { display: flex; }
.detail-panel {
  width: 490px; background: var(--surface); height: 100%;
  overflow-y: auto; display: flex; flex-direction: column;
  box-shadow: -8px 0 48px rgba(0,0,0,0.2);
  animation: slideIn 0.24s ease;
}
.detail-panel::-webkit-scrollbar { width: 5px; }
.detail-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.dp-head {
  padding: 17px 22px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); background: var(--navy);
  position: sticky; top: 0; z-index: 1;
}
.dp-head-title { font-family: var(--font-serif); font-size: 15px; font-weight: 500; color: #fff; letter-spacing: 0.3px; }
.dp-close      {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.1); border: none; cursor: pointer;
  color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.dp-close:hover { background: rgba(255,255,255,0.2); }
.dp-gallery     { position: relative; flex-shrink: 0; }
.dp-gallery img { width: 100%; height: 228px; object-fit: cover; display: block; }
.dp-img-ph      {
  width: 100%; height: 228px;
  background: linear-gradient(140deg,#C8D5E0,#AEBFCD);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; color: rgba(20,39,61,0.14);
}
.dp-thumbs {
  display: flex; align-items: center; gap: 6px; padding: 9px 16px;
  overflow-x: auto; overflow-y: hidden; flex-shrink: 0;
  background: var(--gray-bg); border-bottom: 1px solid var(--border-soft);
}
.dp-thumbs::-webkit-scrollbar { display: none; }
.dp-thumb {
  width: 54px; height: 40px; border-radius: 7px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; flex-shrink: 0;
}
.dp-thumb.active { border-color: var(--gold); }
.dp-thumb img    { width: 100%; height: 100%; object-fit: cover; }
.gallery-ctr     {
  position: absolute; bottom: 11px; right: 15px;
  background: rgba(12,26,42,0.65); color: #fff;
  font-size: 11px; padding: 3px 9px; border-radius: 12px;
}
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(12,26,42,0.5); color: #fff; font-size: 18px;
  cursor: pointer; align-items: center; justify-content: center; z-index: 2;
  transition: background 0.15s;
}
.gal-nav:hover { background: rgba(12,26,42,0.82); }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
[dir="rtl"] .gal-prev { left: auto; right: 10px; }
[dir="rtl"] .gal-next { right: auto; left: 10px; }
.dp-body     { padding: 20px 22px; flex: 1; }
.dp-price    { font-family: var(--font-serif); font-size: 25px; font-weight: 700; color: var(--text); }
.dp-price-sub { font-size: 12px; color: var(--muted); margin: 2px 0 7px; }
.dp-addr     { font-size: 13px; color: var(--muted); margin-bottom: 17px; display: flex; align-items: center; gap: 5px; }
.dp-feats    { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 17px; }
.dp-feat     { background: var(--gray-bg); border: 1px solid var(--border-soft); border-radius: 11px; padding: 11px 8px; text-align: center; }
.dp-feat-n   { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--navy-dark); }
.dp-feat-l   { font-size: 10px; color: var(--muted); margin-top: 2px; }
.dp-tags     { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.dp-tag      { background: var(--gold-pale); border: 1px solid var(--gold-light); border-radius: 20px; padding: 4px 13px; font-size: 11px; color: var(--gold-deep); font-weight: 500; }
.dp-desc     { font-size: 13px; line-height: 1.75; color: var(--text); margin-bottom: 19px; }
.dp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-radius: 11px; overflow: hidden; margin-bottom: 19px; }
.dp-info-cell { background: var(--surface); padding: 11px 15px; }
.dp-info-lbl  { font-size: 10px; color: var(--hint); text-transform: uppercase; letter-spacing: 0.5px; }
.dp-info-val  { font-size: 13px; font-weight: 500; color: var(--text); margin-top: 2px; }
.dp-actions   { display: flex; gap: 8px; margin-bottom: 19px; }
.dp-agent-row { background: var(--gray-bg); border: 1px solid var(--border-soft); border-radius: 13px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.dp-agent-av  { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-pale); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--navy); flex-shrink: 0; }

/* ── MODAL ────────────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(8,18,30,0.5); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.modal-head { padding: 21px 24px 17px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; z-index: 1; border-radius: 18px 18px 0 0; }
.modal-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; }
.modal-close { width: 30px; height: 30px; border-radius: 8px; border: none; background: var(--gray-bg); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--muted); transition: background 0.15s; }
.modal-close:hover { background: var(--border); }
.modal-body   { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; justify-content: flex-end; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span2 { grid-column: span 2; }
label { font-size: 12px; font-weight: 500; color: var(--muted); }
.form-control {
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px;
  font-size: 13px; font-family: inherit; color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; background: #fff;
}
.form-control:focus { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(44,74,107,0.1); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control   { cursor: pointer; }

/* ── LOADER ───────────────────────────────────────────────────────────────── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { padding: 34px; text-align: center; color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ── TOAST ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; right: 26px;
  background: var(--navy-dark); color: #fff;
  padding: 13px 19px; border-radius: 12px; font-size: 13px;
  z-index: 999; display: none; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); border-left: 3px solid var(--gold);
  animation: fadeUp 0.2s ease;
}
.toast.show  { display: flex; }
.toast.error { border-left-color: var(--red); }
@keyframes fadeUp { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── LOGIN ────────────────────────────────────────────────────────────────── */
.login-split { display: flex; width: 860px; max-width: 94vw; min-height: 520px; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.45); }
.login-hero {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
  padding: 46px 40px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
}
.login-hero::after {
  content: ''; position: absolute; right: -70px; bottom: -70px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,146,78,0.18), transparent 70%);
}
.login-wordmark { font-family: var(--font-serif); font-size: 30px; font-weight: 600; letter-spacing: 2px; }
.login-wordmark .brand-accent { color: var(--gold); }
.login-rule { width: 40px; height: 2px; background: var(--gold); margin: 14px 0; }
.login-tag { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.72); max-width: 300px; position: relative; z-index: 1; }
.login-hero-foot { font-size: 11px; color: rgba(255,255,255,0.4); letter-spacing: 1.5px; text-transform: uppercase; position: relative; z-index: 1; }
.login-form-side { width: 380px; max-width: 50vw; padding: 46px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-form-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--navy-dark); }
.login-form-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; margin-bottom: 26px; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .props-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .home-grid     { grid-template-columns: 1fr; }
  .cal-layout    { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .hero-strip    { flex-direction: column; gap: 18px; align-items: flex-start; }
  .login-hero    { display: none; }
  .login-split   { width: 400px; }
  .login-form-side { width: 100%; max-width: 100%; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 66px; }
  .brand-sub, .brand-name span, .s-agent-name, .s-agent-role, .nav-item span { display: none; }
  .brand-name { font-size: 0; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item i { width: auto; }
  .sidebar-brand { padding: 16px 12px; }
  .sidebar-agent { justify-content: center; }
  .s-agent-av    { margin: 0; }
  .props-grid    { grid-template-columns: 1fr; }
  .detail-panel  { width: 100%; }
}
