/* ============================================================================
   هوية Accu GPS المعتمدة (2026-10-16) لواجهة العملاء وحدها.

   تُحمَّل بعد app.css وmap.css في index.html العملاء فقط: لوحة المشغل ولوحة
   المنصة تقرآن app.css نفسه، ولكل منهما هويتها، فلا يمسهما شيء هنا.
   الرجوع عنها حذف سطر الرابط. النسخ السابقة في docs/backup/web.
   ========================================================================== */

:root {
  --bg:            #F3F5F8;
  --surface:       #FFFFFF;
  --surface-2:     #F9FAFC;
  --surface-3:     #EEF1F5;
  --border:        #E2E7EE;
  --border-soft:   #EEF1F5;
  --border-strong: #CBD3DE;

  --text:          #0D1B2A;
  --text-2:        #56677C;
  --text-3:        #93A1B2;

  /* الازرق للاوامر والتحديد وحدهما، لا للحالات */
  --accent:        #0B5FFF;
  --accent-hover:  #0848C4;
  --accent-press:  #06379A;
  --accent-soft:   #E9F0FF;
  --accent-line:   #BFD3FF;

  --nav-bg:        #0D1B2A;
  --nav-bg-2:      #1A2B3F;
  --nav-text:      #A9B7C9;
  --nav-text-2:    #6A7F98;
  --nav-border:    #24384F;

  --good:          #0E9F5B;
  --good-soft:     #E3F5EC;
  --warn:          #D97F00;
  --warn-soft:     #FFF2DC;
  --crit:          #E0393E;
  --crit-soft:     #FDE8E8;
  --info:          #0B5FFF;
  --info-soft:     #E9F0FF;

  --c-series:      #0B5FFF;
  --c-grid:        #EEF1F5;

  --m-bg:          #EEF1F5;
  --m-panel-2:     #F9FAFC;
  --m-edge:        #E2E7EE;
  --m-text:        #0D1B2A;
  --m-text-2:      #56677C;
  --m-text-3:      #93A1B2;

  /* حواف رفيعة بدل الظلال: البطاقات لا تطفو */
  --shadow-xs:     none;
  --shadow-sm:     none;
}

/* ── صفحة الدخول: البطاقة بيضاء كاملة الارتفاع، وبجانبها لوح الهوية الكحلي ── */
.login-page { display: flex; align-items: stretch; padding: 0; background: #fff; }
.login-page[hidden] { display: none; }
.login-page::before { display: none; }
.login-card {
  width: 460px; max-width: 100%; flex: none; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none;
  padding: 36px 52px; display: flex; flex-direction: column; justify-content: center; background: #fff; overflow: auto;
}
.login-card .brand .mark { background: var(--accent); border-radius: 10px; }
.login-intro { margin-top: 34px; }
.login-intro h1 { font-size: 23px; font-weight: 800; }
.login-intro p { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; }
.login-card form { margin-top: 18px; gap: 12px; }
.login-card label { font-size: 12.5px; }
.login-card .brand.lockup .mark.mark-img img { max-height: 32px; }
.login-card .input { height: 40px; border-radius: 9px; font-size: 13.5px; }
.login-card .btn-primary { height: 42px; border-radius: 9px; font-size: 14px; font-weight: 700; }
.login-card .form-err { background: var(--crit-soft); border: 1px solid #F3AFB1; border-radius: 10px; padding: 9px 12px; }
.login-art { flex: 1; min-width: 0; position: relative; overflow: hidden; background: var(--nav-bg); color: #fff; display: flex; align-items: flex-end; }
.login-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-pitch { position: relative; padding: 0 56px 64px; max-width: 560px; }
.login-pitch h2 { font-size: 30px; font-weight: 800; line-height: 1.5; }
.login-pitch p { color: #A9B7C9; font-size: 14px; margin: 10px 0 0; }
.login-pitch ul { list-style: none; display: flex; gap: 10px; padding: 0; margin: 22px 0 0; flex-wrap: wrap; }
.login-pitch li { border: 1px solid #2A3D55; border-radius: 8px; padding: 6px 14px; font-size: 13px; color: #C9D4E2; }
@media (max-width: 900px) { .login-art { display: none; } .login-card { width: 100%; padding: 32px 24px; align-items: center; } .login-card > * { width: 100%; max-width: 380px; } }

/* ── المشهد المتحرك في لوح الهوية (js/core/login-scene.js) ── */
.login-art { background: #0A1524; }
.login-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, #0A1524 18%, rgba(10,21,36,0)); pointer-events: none; }
.login-pitch { z-index: 2; pointer-events: none; }
.ls-map { cursor: crosshair; }
.ls-flow { animation: ls-flow 1.6s linear infinite; }
@keyframes ls-flow { to { stroke-dashoffset: -44; } }
.ls-flabel { fill: #8FB6FF; font: 700 12px 'Cairo', sans-serif; paint-order: stroke; stroke: #0A1524; stroke-width: 4px; }
.ls-car { transition: none; }

.ls-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; padding: 26px 30px; display: flex; flex-direction: column; gap: 14px; }
.ls-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ls-live { display: inline-flex; align-items: center; gap: 8px; background: rgba(22,199,91,.12); color: #3EE08A; border: 1px solid rgba(22,199,91,.3); border-radius: 20px; padding: 5px 12px; font: 700 12.5px 'Cairo', sans-serif; }
.ls-live i { width: 8px; height: 8px; border-radius: 50%; background: #16C75B; animation: ls-ping 1.6s infinite; }
.ls-live b { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
@keyframes ls-ping { 0% { box-shadow: 0 0 0 0 rgba(22,199,91,.7); } 100% { box-shadow: 0 0 0 10px rgba(22,199,91,0); } }
.ls-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ls-stat { display: inline-flex; align-items: center; gap: 7px; background: rgba(13,27,42,.78); backdrop-filter: blur(6px); border: 1px solid #22344C; border-radius: 10px; padding: 5px 11px; font-size: 12px; color: #A9B7C9; }
.ls-stat i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ls-stat b { font: 600 14px 'IBM Plex Mono', monospace; color: #fff; }
.ls-stat.bump { animation: ls-bump .6s ease; }
@keyframes ls-bump { 30% { border-color: var(--c); transform: scale(1.08); } }

.ls-feed { display: flex; flex-direction: column; gap: 8px; width: 290px; max-width: 100%; margin-inline-start: auto; }
.ls-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; background: rgba(13,27,42,.86); backdrop-filter: blur(8px); border: 1px solid #22344C; border-inline-start: 3px solid var(--c); border-radius: 12px; padding: 8px 11px; color: #fff;
  opacity: 0; transform: translateY(-10px); transition: opacity .4s, transform .4s; }
.ls-item.in { opacity: 1; transform: none; }
.ls-item:nth-child(3) { opacity: .7; }
.ls-item:nth-child(4) { opacity: .4; }
.ls-item .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--c); display: grid; place-items: center; font-weight: 900; font-size: 14px; color: #fff; }
.ls-item b { display: block; font-size: 12.5px; font-weight: 700; }
.ls-item small { font-size: 11px; color: #8DA0B8; font-family: 'IBM Plex Mono', 'Cairo', monospace; }
.ls-item.alert { --c: #FF3B4E; }
.ls-item.enter { --c: #3D8BFF; }
.ls-item.exit { --c: #6C7FA0; }
.ls-item.idle { --c: #FF9F1C; }

.ls-card { position: absolute; top: 50%; inset-inline-end: 30px; transform: translateY(-50%); display: grid; gap: 2px; min-width: 170px; background: rgba(13,27,42,.92); border: 1px solid var(--c); border-radius: 12px; padding: 10px 14px; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.ls-card[hidden] { display: none; }
.ls-card b { font-size: 14px; }
.ls-card .st { color: var(--c); font-size: 12px; font-weight: 700; }
.ls-card .sp { font: 600 18px 'IBM Plex Mono', monospace; }
.ls-card em { font-style: normal; font-size: 11px; color: #8DA0B8; }
@media (prefers-reduced-motion: reduce) { .ls-flow, .ls-live i { animation: none; } .ls-item { transition: none; } }

/* ── القائمة الجانبية: صف نشط داخل حبة، والايقونة النشطة زرقاء فاتحة ── */
.nav-brand .mark { background: var(--accent); border-radius: 9px; }
.nav-sec { padding: 14px 20px 4px; color: var(--nav-text-2); }
.nav-link {
  height: 34px; margin-inline: 10px; width: calc(100% - 20px);
  padding-inline: 10px; border-radius: 8px; border-inline-end: 0;
}
.nav-link.on { background: #24384F; border-inline-end: 0; }
.nav-link.on svg { color: #6E9BFF; }
.nav--collapsed .nav-link { margin-inline: 10px; width: calc(100% - 20px); }
.nav-user .av { background: #fff; color: var(--nav-bg); border-radius: 50%; font-weight: 800; }

/* ── الشريط العلوي ── */
.topbar { height: 60px; }
.crumb b { font-size: 18px; font-weight: 800; }

/* ── شريط ادوات الخريطة الحية: الكحلي بدل الاخضر الداكن ── */
.dock-main { background: var(--nav-bg); }
.dock-badge { box-shadow: 0 0 0 2px var(--nav-bg); }
.dock-main .dock-btn.on { box-shadow: inset 0 -2px 0 #6E9BFF; }
.obj-round { box-shadow: none; }

/* ── لوحة الاجسام وبطاقة التفاصيل في الخريطة الحية ── */
.obj-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--border); flex: none; }
.obj-states button {
  border: 0; background: none; cursor: pointer; padding: 7px 0 6px; text-align: center;
  border-bottom: 2px solid transparent; font: inherit; color: inherit; min-width: 0;
}
.obj-states button + button { border-inline-start: 1px solid var(--border); }
.obj-states button:hover { background: #F7F9FC; }
.obj-states button.on { border-bottom-color: var(--accent); background: #F7F9FC; }
.obj-states em { font-style: normal; font-size: 11px; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.obj-states em i { width: 7px; height: 7px; border-radius: 50%; display: block; flex: none; }
.obj-states strong { font: 600 17px var(--font-mono); display: block; line-height: 1.3; }

.obj-panel, .obj-detail { box-shadow: none !important; border: 1px solid var(--border); border-radius: 10px; }
.obj-head h2 { font-weight: 800; }
.obj-group { background: #F7F9FC; }
.obj-row.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.map-tools, .map-side { box-shadow: none !important; border: 1px solid var(--border); }

/* لوحة الاشعارات: ايقونة في مربع ملون، والعنوان ثم الجسم والوقت في سطر */
.ntf-panel, .ntf-card { box-shadow: none !important; border: 1px solid var(--border); border-radius: 10px; }
.ntf-head h2 { font-weight: 800; }
.ntf-bar { background: #F7F9FC; }
.ntf-row { align-items: center; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--border-soft); }
.ntf-kind { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; padding: 0; background: var(--warn-soft); color: var(--warn); }
.ntf-row .bd b { font-weight: 800; }
.ntf-row .bd .ob, .ntf-row .bd .tm { display: inline; }
.ntf-row .bd .ob::after { content: " · "; }
.ntf-row .bd .tm { font-family: var(--font-mono); }
.ntf-row.read { opacity: 1; }
.ntf-row.read .ntf-kind { background: #EEF1F5; color: var(--text-3); }
.ntf-row.read .bd b { font-weight: 600; color: var(--text-2); }
.ntf-row.on { border-inline-start: 0; box-shadow: inset 0 0 0 1px var(--accent-line); }
.ntf-foot { font-weight: 700; color: var(--accent); }

.det-sum { border-bottom: 1px solid var(--border); margin: 0 0 6px; }
.det-sum .spd { display: flex; align-items: flex-end; gap: 14px; padding: 12px 16px 6px; }
.det-sum .spd .n { font: 600 42px/1 var(--font-mono); letter-spacing: -2px; white-space: nowrap; }
.det-sum .spd .n.over { color: var(--crit); }
.det-sum .spd .n small { font: 400 13px var(--font); color: var(--text-2); letter-spacing: 0; margin-inline-start: 4px; }
.det-sum .spd .l { flex: 1; padding-bottom: 6px; min-width: 0; }
.det-sum .spd .lb { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.det-sum .spd .bar { height: 6px; border-radius: 3px; background: #EEF1F5; margin-top: 4px; position: relative; }
.det-sum .spd .bar b { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; }
.det-sum .spd .bar i { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--crit); }
.det-sum .grid6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); margin-top: 8px; }
.det-sum .grid6 > div { padding: 8px 14px; border-bottom: 1px solid var(--border); min-width: 0; }
.det-sum .grid6 > div:not(:nth-child(3n+1)) { border-inline-start: 1px solid var(--border); }
.det-sum .grid6 em { font-style: normal; font-size: 11px; color: var(--text-3); display: block; white-space: nowrap; }
.det-sum .grid6 strong { font: 600 14px var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.det-sum .acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.det-sum .acts button {
  border: 0; background: none; cursor: pointer; padding: 8px 0; font: 600 11.5px var(--font); color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.det-sum .acts button + button { border-inline-start: 1px solid var(--border); }
.det-sum .acts button span { color: var(--text); display: flex; }
.det-sum .acts button svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.det-sum .acts button:hover, .det-sum .acts button.on { background: #F7F9FC; color: var(--accent); }

/* ── الاوامر ── */
.btn { border-radius: 9px; box-shadow: none; }
.btn-primary { box-shadow: none; }

/* ── البطاقات ── */
.card { box-shadow: none; }
.card-head { min-height: 46px; padding: 10px 16px; border-bottom-color: var(--border); }
.card-head h3 { font-weight: 800; }

/* ── المؤشرات: شريط واحد بفواصل، لا بطاقات متفرقة ── */
.stats {
  gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stat { border: 0; border-radius: 0; box-shadow: none; padding: 11px 16px 9px; border-inline-start: 1px solid var(--border); margin-inline-start: -1px; }
.stat .v { font-family: var(--font-mono); font-weight: 600; font-size: 22px; }
.stat .v small { font-family: var(--font); }

/*
    ── الشكل «ب» المعتمد (2026-10-16) ──
    نقطة ملونة قبل كل عنوان بدل الرمز، وحين تتقاسم الخلايا كلا: شريط توزيع واحد
    فوق الارقام، ونسبة كل خلية بجانب رقمها، والخلاصة (اجمالي او معدل) بعد فاصل.
*/
.stats [data-tone="accent"] { --tone: #378ADD; }
.stats [data-tone="warn"]   { --tone: #EF9F27; }
.stats [data-tone="crit"]   { --tone: #E24B4A; }
.stats [data-tone="good"]   { --tone: #97C459; }
.stats [data-tone="teal"]   { --tone: #1D9E75; }
.stats [data-tone="violet"] { --tone: #7F77DD; }
.stats [data-tone="coral"]  { --tone: #D85A30; }
.stats [data-tone="ink"]    { --tone: #5F6B7A; }
.stats .stat .l { justify-content: flex-start; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.stats .stat .l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--accent)); flex: none; }
.stats .stat .l span:has(> svg) { display: none !important; }
.stats .stat .v .pct { display: inline-block; vertical-align: middle; font: 700 11px var(--font-mono); color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border-radius: 6px; padding: 1px 6px; margin-inline-start: 8px; letter-spacing: 0; }

.stats.has-bar { padding: 14px 6px 6px; border-radius: 12px; }
.stats-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin: 0 10px 8px; background: #EEF1F5; }
.stats-bar i { display: block; background: var(--tone); min-width: 4px; transition: flex .4s ease; }
.stats.has-bar > .stat { border-inline-start: 0; margin-inline-start: 0; padding: 4px 10px 8px; }
.stats.has-bar > .stat:not([data-share]) { border-inline-start: 1px solid var(--border); padding-inline-start: 14px; }


/* ── الجداول ── */
table.grid th { background: #F9FAFC; font-size: 11.5px; color: var(--text-2); font-weight: 700; }
table.grid td { padding-block: 7px; }
table.grid tbody tr:hover td { background: #F7F9FC; }

/* ── الشارات والقطع ── */
.pill { border-radius: 6px; font-weight: 700; }
.pill.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* تبويبات بعدد: تحت الشريط العلوي وفوق القائمة */
.ctabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ctabs button {
  border: 0; background: none; cursor: pointer; padding: 7px 13px; margin-bottom: -1px;
  font: 600 13px var(--font); color: var(--text-2); border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.ctabs button b { font: 500 11px var(--font-mono); color: var(--text-3); }
.ctabs button:hover { color: var(--text); }
.ctabs button.on { color: var(--text); font-weight: 700; border-bottom-color: var(--nav-bg); }

/* شريط الاختيار الجماعي */
.bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--nav-bg); color: #fff; border-radius: 9px; padding: 6px 12px; font-size: 12.5px;
}
.bulkbar .btn { height: 30px; font-size: 12px; background: #24384F; color: #fff; border: 0; }
.bulkbar .btn:hover { background: #2E4561; }
.bulkbar-x { margin-inline-start: auto; background: none; border: 0; color: #A9B7C9; font-size: 18px; cursor: pointer; line-height: 1; }

/* شريط التحديد المدمج في كل جدول يأخذ شكل الشريط الداكن */
.tbl-sel-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--nav-bg); color: #fff; border-radius: 9px; padding: 6px 12px; margin: 10px 12px; font-size: 12.5px;
}
.tbl-sel-bar .btn { height: 30px; font-size: 12px; background: #24384F; color: #fff; border: 0; }
.tbl-sel-bar .btn:hover { background: #2E4561; }
.tbl-sel-bar .btn:last-child { margin-inline-start: auto; background: none; color: #A9B7C9; }

/* صف المرشحات تحت العناوين */
.fs-filters td { padding: 0 6px 8px !important; border-bottom: 1px solid var(--border-strong) !important; }
.fs-filters .input, .fs-filters select, .fs-filters input {
  height: 28px; font-size: 11.5px; border-radius: 6px; background: #FBFCFD; border-color: var(--border);
}

/* خانة تحديد صف */
.row-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
table.grid tr.picked td { background: var(--accent-soft); }
.seg { box-shadow: none; }
.seg button.on { background: var(--nav-bg); }
.tab.on { color: var(--text); border-bottom-color: var(--nav-bg); }
.meter i { background: var(--accent); }
/* الخلاصة اول الشريط: فاصلها بعدها لا قبلها */
.stats.has-bar > .stats-bar + .stat:not([data-share]) { border-inline-start: 0; padding-inline-start: 10px; border-inline-end: 1px solid var(--border); }
