/* =====================================================
   PMS MANAGER — Complete Design System v2
   Aesthetic: Luxury SaaS · Deep Space · Soft Indigo
   ===================================================== */



/* ─── CSS VARIABLES ─────────────────────────────────── */
:root {
  /* Dark theme (default) */
  --bg:         #080c14;
  --bg2:        #0e1523;
  --bg3:        #141d2f;
  --card:       #111827;
  --card2:      #1a2235;
  --sidebar:    #090d18;
  --border:     rgba(99,102,241,0.12);
  --border2:    rgba(99,102,241,0.22);
  --accent:     #6366f1;
  --accent2:    #818cf8;
  --accent-dim: rgba(99,102,241,0.10);
  --accent-glow:rgba(99,102,241,0.25);
  --text:       #f1f5f9;
  --text2:      #94a3b8;
  --text3:      #475569;
  --green:      #10b981;
  --orange:     #f59e0b;
  --red:        #f43f5e;
  --cyan:       #06b6d4;
  --font:       'Outfit', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --font-ar:    'Cairo', sans-serif;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.6);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

body.theme-light {
  --bg:         #f0f4ff;
  --bg2:        #e8eef9;
  --bg3:        #dde5f5;
  --card:       #ffffff;
  --card2:      #f4f7fe;
  --sidebar:    #1a1f3a;
  --border:     rgba(99,102,241,0.15);
  --border2:    rgba(99,102,241,0.30);
  --text:       #1e2749;
  --text2:      #5a6484;
  --text3:      #9aa3be;
  --accent-dim: rgba(99,102,241,0.08);
  --accent-glow:rgba(99,102,241,0.15);
  --shadow:     0 4px 24px rgba(99,102,241,0.10);
  --shadow-lg:  0 8px 48px rgba(99,102,241,0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.rtl { font-family: var(--font-ar); direction: rtl; }

/* ─── LAYOUT ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: 250px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
}
body.rtl .sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
body.theme-light .sidebar { border-color: rgba(99,102,241,0.15); }

/* Brand */
.sidebar-brand {
  padding: 28px 24px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.brand-text { flex: 1; }
.brand-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.3px; line-height: 1.2; }
.brand-ver  { font-size: 10px; color: var(--text3); font-family: var(--font-mono); margin-top: 2px; }

/* Nav */
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { color: var(--text); background: var(--accent-dim); }
.nav-item.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}
body.theme-light .nav-item.active { color: #fff; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
body.rtl .nav-item { flex-direction: row-reverse; }

/* Sidebar Controls */
.sidebar-controls {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all var(--transition);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  background: transparent;
}
.lang-btn:hover { color: var(--accent2); border-color: var(--accent2); }
.lang-btn.active { background: var(--accent-dim); color: var(--accent2); border-color: var(--border2); }
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; text-decoration: none; cursor: pointer;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--border2); transform: scale(1.1); }

/* Sidebar Footer */
.sidebar-footer { padding: 16px; }
.btn-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px;
  background: rgba(244,63,94,0.08); border: 1px solid rgba(244,63,94,0.2);
  border-radius: var(--radius-sm); color: #f87171;
  text-decoration: none; font-size: 12px; font-weight: 500;
  transition: all var(--transition);
}
.btn-logout:hover { background: rgba(244,63,94,0.15); border-color: rgba(244,63,94,0.4); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 300;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
  box-shadow: var(--shadow);
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
  backdrop-filter: blur(2px);
}

/* ─── MAIN ───────────────────────────────────────────── */
.main {
  flex: 1;
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.rtl .main { margin-left: 0; margin-right: 250px; }

/* ─── PAGE HEADER ────────────────────────────────────── */
.page-header {
  padding: 32px 32px 0;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.page-sub {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── CONTENT ────────────────────────────────────────── */
.content { padding: 0 32px 40px; }

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border2); }
.card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 20px;
  font-family: var(--font-mono);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* ─── KPI CARDS ──────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.kpi-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kpi-card:hover::before { opacity: 1; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--text3); text-transform: uppercase; font-family: var(--font-mono); }
.kpi-badge {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.kpi-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 6px; letter-spacing: -1px; }
.kpi-sub { font-size: 11px; color: var(--text3); font-family: var(--font-mono); }
.kpi-trend {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 600;
  margin-top: 4px;
}
.kpi-trend.up { background: rgba(16,185,129,0.1); color: var(--green); }
.kpi-trend.neu { background: var(--accent-dim); color: var(--accent2); }

/* ─── FILTER BAR ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.filter-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text3);
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.btn-group { display: flex; gap: 4px; }
.btn-xs { padding: 6px 12px; font-size: 11px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text2); font-family: var(--font); font-weight: 500; transition: all var(--transition); white-space: nowrap; }
.btn-xs:hover { border-color: var(--accent); color: var(--accent2); }
.btn-xs.btn-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }
.form-control-sm {
  padding: 7px 12px;
  font-size: 12px;
  min-width: 130px;
}

/* ─── GRIDS ──────────────────────────────────────────── */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* ─── TABLE ──────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  background: var(--card2);
  padding: 12px 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-family: var(--font-mono);
  white-space: nowrap;
}
body.rtl .table thead th { text-align: right; }
.table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.table tbody tr:hover { background: var(--accent-dim); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody td { padding: 14px 18px; vertical-align: middle; font-size: 13px; }

/* ─── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 10px; font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.badge::before { content: '●'; font-size: 7px; }
.badge-confirmed { background: rgba(16,185,129,0.1); color: #34d399; }
.badge-pending   { background: rgba(245,158,11,0.12); color: #fbbf24; }
.badge-cancelled { background: rgba(244,63,94,0.1); color: #fb7185; }
.badge-completed { background: rgba(99,102,241,0.1); color: var(--accent2); }
.badge-active    { background: rgba(16,185,129,0.1); color: #34d399; }
.badge-inactive  { background: rgba(148,163,184,0.1); color: var(--text3); }

.channel-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 500;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-ghost {
  background: var(--accent-dim);
  border: 1px solid var(--border2);
  color: var(--accent2);
}
.btn-ghost:hover { background: rgba(99,102,241,0.16); border-color: var(--accent); }
.btn-danger  { background: rgba(244,63,94,0.1); border: 1px solid rgba(244,63,94,0.2); color: #fb7185; }
.btn-danger:hover  { background: rgba(244,63,94,0.18); }
.btn-sm      { padding: 7px 14px; font-size: 12px; }
.btn-icon    { width: 36px; height: 36px; padding: 0; justify-content: center; }

/* ─── FORMS ──────────────────────────────────────────── */
.form-group  { margin-bottom: 18px; }
.form-label  {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text3); margin-bottom: 7px;
  font-family: var(--font-mono);
}
.form-control {
  width: 100%;
  padding: 11px 15px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  transition: all var(--transition);
  -webkit-appearance: none;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-control::placeholder { color: var(--text3); }
body.theme-light .form-control { background: var(--bg3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ─── MODAL ──────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed;
  inset: 0; background: rgba(0,0,0,0.65);
  z-index: 999; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 500px; max-width: 95vw; max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .25s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title  { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.modal-close  { width: 32px; height: 32px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--border); color: var(--text3); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); line-height: 1; }
.modal-close:hover { border-color: var(--red); color: var(--red); }

/* ─── DETAIL ROWS ────────────────────────────────────── */
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-key { font-size: 11px; color: var(--text3); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-val { font-size: 13px; color: var(--text); font-weight: 500; text-align: right; }
.detail-val.accent { color: var(--accent2); font-size: 16px; font-weight: 700; }
body.rtl .detail-row { flex-direction: row-reverse; }

/* ─── FLASH ──────────────────────────────────────────── */
.flash { margin: 0 32px 20px; padding: 13px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.flash-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.25); color: #34d399; }
.flash-error   { background: rgba(244,63,94,0.08); border: 1px solid rgba(244,63,94,0.25); color: #fb7185; }

/* ─── SYNC BAR ───────────────────────────────────────── */
.sync-bar  { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin: 8px 0 6px; }
.sync-fill { height: 100%; border-radius: 2px; transition: width 1.5s ease; }

/* ─── PROPERTY CARD ──────────────────────────────────── */
.prop-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.prop-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow); }
.prop-hero {
  height: 110px;
  background: linear-gradient(135deg, var(--card2), var(--bg3));
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  position: relative; overflow: hidden;
}
.prop-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.prop-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.5));
  pointer-events: none;
}
.prop-body { padding: 18px; }
.prop-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.prop-meta { font-size: 11px; color: var(--text3); font-family: var(--font-mono); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.prop-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.prop-stat  { background: var(--bg2); border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--border); }
.prop-stat-label { font-size: 9px; font-weight: 600; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-mono); margin-bottom: 4px; }
.prop-stat-val   { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.prop-actions { display: flex; gap: 8px; }

/* ─── ADD CARD ───────────────────────────────────────── */
.add-card {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px; cursor: pointer;
  transition: all var(--transition);
  color: var(--text3); text-decoration: none;
  min-height: 200px;
}
.add-card:hover { border-color: var(--accent); color: var(--accent2); background: var(--accent-dim); }
.add-card-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }
.add-card-label { font-size: 13px; font-weight: 600; }

/* ─── PHOTO UPLOAD ───────────────────────────────────── */
.photo-upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.photo-upload-zone:hover { border-color: var(--accent); background: var(--accent-dim); }
.photo-upload-zone.dragover { border-color: var(--accent); background: var(--accent-dim); }
.photo-upload-icon { font-size: 36px; margin-bottom: 10px; }
.photo-upload-text { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.photo-upload-sub  { font-size: 11px; color: var(--text3); }
.photo-preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.photo-thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); position: relative; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── CALENDAR ───────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-header { text-align: center; font-size: 10px; font-weight: 600; color: var(--text3); padding: 6px 0; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; }
.cal-cell {
  height: 56px; border-radius: 10px;
  background: var(--card2); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 13px; cursor: default; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.cal-cell.today { border-color: var(--accent); background: var(--accent-dim); }
.cal-cell.today .cal-num { color: var(--accent2); font-weight: 700; }
.cal-cell.booked { cursor: pointer; }
.cal-cell.booked:hover { opacity: 0.85; transform: scale(1.03); }
.cal-num { color: var(--text2); font-weight: 500; }
.cal-dot { font-size: 10px; margin-top: 2px; }

/* ─── URL ROW ────────────────────────────────────────── */
.url-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.url-val {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 11px; color: var(--text3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-mono);
}

/* ─── UTILITIES ──────────────────────────────────────── */
.flex        { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-20  { margin-bottom: 20px; }
.mb-24  { margin-bottom: 24px; }
.text-accent { color: var(--accent2); }
.text-muted  { color: var(--text3); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.font-mono   { font-family: var(--font-mono); }
.fw-700 { font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green  { background: var(--green); }
.dot-orange { background: var(--orange); }
.dot-red    { background: var(--red); }

/* ─── WHATSAPP BTN ───────────────────────────────────── */
.btn-whatsapp {
  background: rgba(37,211,102,0.08); border: 1px solid rgba(37,211,102,0.25); color: #25d366;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 12px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--transition); font-family: var(--font); font-weight: 600;
}
.btn-whatsapp:hover { background: rgba(37,211,102,0.15); }

/* ─── SECTION DIVIDER ────────────────────────────────── */
.section-title {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  color: var(--text3); text-transform: uppercase;
  font-family: var(--font-mono);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

/* ─── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
.animate-in { animation: fadeIn 0.35s ease forwards; }

/* ─── LOGIN PAGE ─────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.12) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(6,182,212,0.06) 0%, transparent 50%);
}
.login-card {
  width: 420px; max-width: 95vw;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
  animation: fadeIn 0.4s ease;
}
.login-brand { text-align: center; margin-bottom: 36px; }
.login-logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 32px var(--accent-glow);
}
.login-title { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-sub { font-size: 12px; color: var(--text3); font-family: var(--font-mono); }
.login-btn { width: 100%; justify-content: center; padding: 13px; font-size: 14px; border-radius: 10px; margin-top: 4px; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-3   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
    box-shadow: var(--shadow-lg);
  }
  body.rtl .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .menu-toggle { display: flex; }
  .main { margin-left: 0 !important; margin-right: 0 !important; }
  .page-header { padding: 70px 20px 0; }
  .content { padding: 0 20px 32px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .flash { margin: 0 20px 16px; }
  .filter-bar { padding: 14px 16px; }
  .modal { padding: 24px 20px; }
  .table-wrap { overflow-x: auto; }
  .photo-preview-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 26px; }
  .page-title { font-size: 22px; }
  .btn-group { flex-wrap: wrap; }
  .prop-stats { grid-template-columns: 1fr 1fr; }
}

/* Date input */
input[type="date"] { color-scheme: dark; }
body.theme-light input[type="date"] { color-scheme: light; }
