/* =========================================================
   يقظة بلادي — Professional Dashboard + Classic Trusted
   BUILD UI: 20260925-ops-split
   ========================================================= */

:root {
  --dash-navy: #0B1F3A;
  --dash-navy-2: #0E2748;
  --dash-teal: #1A6B7A;
  --dash-bg: #F8FAFC;
  --dash-card: #FFFFFF;
  --dash-text: #0F172A;
  --dash-muted: #64748B;
  --dash-line: #E2E8F0;
  --dash-red: #DC2626;
  --dash-green: #059669;
  --dash-amber: #D97706;
  --dash-sidebar-w: 268px;
  --dash-rail-w: 280px;
  --accent: #0B1F3A;
  --accent-2: #1A6B7A;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --danger: #DC2626;
  --ok: #059669;
  --warn: #D97706;
  --border: rgba(15, 23, 42, 0.12);
  --topbar: #FFFFFF;
}

html, body {
  background: var(--dash-bg) !important;
  color: var(--dash-text);
}
body { background-image: none !important; }
.yakadha-splash.hidden { display: none !important; }

.dash-toplang {
  position: sticky; top: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 18px; background: #fff; border-bottom: 1px solid var(--dash-line);
}
.dash-toplang .langs { display: flex; gap: 16px; align-items: center; font-weight: 700; font-size: 14px; }
.dash-toplang .langs button {
  background: transparent !important; border: 0 !important; color: var(--dash-muted) !important;
  padding: 4px 2px !important; border-radius: 0 !important; border-bottom: 2px solid transparent !important;
}
.dash-toplang .langs button.active {
  color: var(--dash-navy) !important; border-bottom-color: var(--dash-red) !important; outline: 0 !important;
}
.dash-brand-center { text-align: center; }
.dash-brand-center b { display: block; font-size: 15px; color: var(--dash-navy); }
.dash-brand-center small { color: var(--dash-muted); font-size: 11px; }
.dash-userchip {
  display: flex; align-items: center; gap: 8px;
  background: #F8FAFC; border: 1px solid var(--dash-line);
  border-radius: 999px; padding: 6px 10px; font-size: 13px;
}

.dash-shell {
  display: grid;
  grid-template-columns: var(--dash-sidebar-w) minmax(0, 1fr) var(--dash-rail-w);
  min-height: calc(100vh - 58px);
}

.dash-sidebar {
  background: linear-gradient(180deg, var(--dash-navy), #071422);
  color: #fff; padding: 18px 14px 20px;
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.dash-avatar { text-align: center; margin-bottom: 16px; }
.dash-avatar .circle {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 8px;
  background: #1d4ed8; display: grid; place-items: center; font-size: 34px;
  border: 3px solid rgba(255,255,255,.2);
}
.dash-avatar b { display: block; }
.dash-avatar small { color: #93c5fd; font-size: 12px; }
.dash-nav { display: grid; gap: 6px; }
.dash-nav button {
  width: 100%; text-align: right; background: transparent !important; border: 0 !important;
  color: #dbeafe !important; border-radius: 12px !important; padding: 10px 12px !important; font-weight: 700;
}
.dash-nav button.active, .dash-nav button:hover {
  background: #1d4ed8 !important; color: #fff !important; outline: 0 !important;
}
.dash-sos-block {
  margin-top: 16px; background: var(--dash-red); color: #fff;
  border-radius: 14px; padding: 10px 12px; font-weight: 900; text-align: center;
}
.dash-phones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dash-phones a {
  display: block; text-decoration: none; color: #fff; border-radius: 12px;
  padding: 10px 8px; text-align: center; font-weight: 800; font-size: 13px;
}
.dash-phones .p1021 { background: #DC2626; }
.dash-phones .p1548 { background: #1d4ed8; }
.dash-phones .p1055 { background: #047857; }
.dash-phones .p112 { background: #c2410c; }
.dash-geo { margin-top: 14px; font-size: 12px; color: #93c5fd; }

.dash-main { padding: 16px 18px 40px; min-width: 0; }
.dash-main .app-topbar,
.dash-main .topbar,
.dash-main .ticker { display: none !important; }
.dash-main nav.tabs {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important;
}

.dash-main .hero {
  min-height: 210px !important; border-radius: 18px !important; margin-bottom: 16px !important;
  box-shadow: 0 10px 30px rgba(15,23,42,.12) !important;
  background:
    linear-gradient(90deg, rgba(11,31,58,.55), rgba(11,31,58,.15)),
    url("./assets/maqam-echahid.jpg") center/cover !important;
}
.dash-main .hero-overlay { padding: 28px !important; color: #fff; }
.dash-main .hero h1 { font-size: 28px !important; margin: 6px 0 !important; }
.dash-main .hero p { font-size: 16px !important; }

.dash-main .panel,
.dash-main .item,
.dash-main .unit-detail-card,
.dash-main .price-card,
.dash-main .library-card,
.dash-main .news-item {
  background: #fff !important; color: var(--dash-text) !important;
  border: 1px solid var(--dash-line) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.dash-main .meta, .dash-main small, .dash-main .muted { color: var(--dash-muted) !important; }
.dash-main .section-title h2 { color: var(--dash-navy); }

.dash-main .feature-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.dash-main .feature-card {
  background: #fff !important; color: var(--dash-text) !important;
  border: 1px solid var(--dash-line) !important; border-radius: 16px !important;
  padding: 16px 10px !important; min-height: 132px;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
}
.dash-main .feature-card span { font-size: 28px; display: block; margin-bottom: 6px; }
.dash-main .feature-card b { display: block; color: var(--dash-navy); }
.dash-main .feature-card small { color: var(--dash-muted) !important; }

.dash-main button.danger, .dash-main .danger {
  background: var(--dash-red) !important; border-color: #ef4444 !important; color: #fff !important;
}
.dash-main button.primary, .dash-main .primary {
  background: var(--dash-navy) !important; border-color: var(--dash-navy) !important; color: #fff !important;
}
.dash-main input, .dash-main select, .dash-main textarea {
  background: #fff !important; color: var(--dash-text) !important; border: 1px solid var(--dash-line) !important;
}

.dash-rail {
  padding: 16px 14px 30px; border-right: 1px solid var(--dash-line);
  background: #F8FAFC; position: sticky; top: 58px;
  height: calc(100vh - 58px); overflow-y: auto;
}
.dash-rail .rail-card {
  background: #fff; border: 1px solid var(--dash-line);
  border-radius: 16px; padding: 14px; margin-bottom: 12px;
}
.dash-rail h3 { margin: 0 0 10px; font-size: 15px; color: var(--dash-navy); }
.alert-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #F1F5F9; font-size: 13px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.dot.red { background: #ef4444; }
.dot.amber { background: #f59e0b; }
.dot.blue { background: #3b82f6; }
.theme-dots { display: flex; gap: 8px; margin: 8px 0; }
.theme-dots span {
  width: 22px; height: 22px; border-radius: 50%; display: inline-block;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer;
}

/* غرفة العمليات: نصف خريطة + نصف معلومات */
.ops-pro-wrap { display: flex; flex-direction: column; gap: 12px; }
.ops-pro-top { display: flex; flex-direction: column; gap: 10px; }
.ops-stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
}
.ops-stats > div {
  background: #fff !important; border: 1px solid var(--dash-line) !important;
  border-radius: 14px; padding: 12px; text-align: center;
  box-shadow: 0 4px 14px rgba(15,23,42,.05);
}
.ops-stats b { display: block; font-size: 22px; color: var(--dash-navy); }
.ops-stats span { color: var(--dash-muted); font-size: 12px; }
.ops-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff !important;
}
.ops-hint { color: var(--dash-muted); font-size: 12px; }

.ops-pro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 620px;
  align-items: stretch;
}
.ops-map-col {
  display: flex; flex-direction: column; min-height: 620px;
  background: #fff !important; border: 1px solid var(--dash-line) !important;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
.ops-map-col .section-head {
  padding: 10px 14px; border-bottom: 1px solid var(--dash-line);
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(90deg, #0B1F3A, #1A6B7A);
  color: #fff;
}
.ops-map-col .section-head h2 { margin: 0; font-size: 15px; color: #fff; }
.ops-map-col .live { color: #86efac; font-weight: 800; font-size: 12px; }

#map.ops-map-fullscreen,
.ops-map-col #map {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 560px !important;
  border-radius: 0 !important;
  width: 100% !important;
}

.ops-info-col {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 620px; max-height: 78vh; overflow-y: auto;
}
.ops-info-col .panel { margin: 0 !important; }
.ops-coord .coord-feed {
  max-height: 180px; overflow-y: auto;
  background: #F8FAFC; border-radius: 10px; padding: 8px;
  border: 1px solid var(--dash-line);
}
.ops-incidents .feed { max-height: 220px; overflow-y: auto; }
.ops-incidents .item {
  background: #F8FAFC !important;
  border: 1px solid var(--dash-line) !important;
}

#loginView { background: var(--dash-bg); color: var(--dash-text); }
#loginView .portal-hero,
#loginView .portal-card { background: #fff; color: var(--dash-text); border-radius: 18px; }

@media (max-width: 1200px) {
  .dash-shell { grid-template-columns: var(--dash-sidebar-w) minmax(0,1fr); }
  .dash-rail { display: none; }
  .dash-main .feature-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .ops-pro-split { grid-template-columns: 1fr; min-height: auto; }
  .ops-map-col, .ops-info-col { min-height: 420px; max-height: none; }
  #map.ops-map-fullscreen, .ops-map-col #map { min-height: 420px !important; }
}
@media (max-width: 760px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { position: relative; top: 0; height: auto; }
  .dash-main .feature-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .ops-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .dash-toplang { flex-wrap: wrap; }
}
