/* Orbit H.Y.M — Home dashboard (RTL, sidebar right, home.html menu) */

/* إلغاء overflow:hidden من orbit-main-dashboard.css */
html:has(body.orbit-home-screen),
html.orbit-home-html {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
}

body.orbit-home-screen {
    font-family: Inter, "Segoe UI", Tahoma, sans-serif;
    background: var(--bg-body, #060c18);
    color: var(--text-primary, #e2e8f0);
    direction: rtl;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    min-height: 100vh;
    height: auto !important;
}

body.orbit-home-screen .main-content.orbit-home-shell {
    margin-right: var(--sidebar-width);
    margin-left: 0;
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(8, 16, 32, 0.4);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 50%, rgba(59, 130, 246, 0.06), transparent 50%),
        var(--bg-body, #060c18);
    transition: margin-right 0.3s ease;
}

body.orbit-home-screen .main-content.orbit-home-shell::-webkit-scrollbar {
    width: 10px;
}

body.orbit-home-screen .main-content.orbit-home-shell::-webkit-scrollbar-track {
    background: rgba(8, 16, 32, 0.5);
}

body.orbit-home-screen .main-content.orbit-home-shell::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.4);
    border-radius: 5px;
    border: 2px solid rgba(8, 16, 32, 0.5);
}

body.orbit-home-screen .main-content.orbit-home-shell::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.6);
}

body.orbit-home-screen .main-content.orbit-home-shell.expanded {
    margin-right: 0;
}

/* ─── Sidebar (home.html menu + orbit skin) ─── */
body.orbit-home-screen .sidebar.orbit-hym-sidebar {
    background: linear-gradient(180deg, rgba(8, 16, 32, 0.98), rgba(6, 12, 24, 0.99));
    border-left: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

body.orbit-home-screen .sidebar.orbit-hym-sidebar .brand {
    font-family: Orbitron, sans-serif;
    letter-spacing: 0.28em;
    font-size: 1.35rem;
    color: #67e8f9;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

body.orbit-home-screen .sidebar .section-toggle {
    background: rgba(56, 189, 248, 0.06);
    border-right: 2px solid transparent;
}

body.orbit-home-screen .sidebar .section-toggle:hover,
body.orbit-home-screen .sidebar .section-toggle.active {
    background: rgba(56, 189, 248, 0.12);
    border-right-color: rgba(56, 189, 248, 0.5);
    color: #e2e8f0;
}

body.orbit-home-screen .sidebar .menu a {
    color: #94a3b8;
    border-right: 2px solid transparent;
}

body.orbit-home-screen .sidebar .menu a:hover,
body.orbit-home-screen .sidebar .menu a.active-link {
    color: #67e8f9;
    background: rgba(56, 189, 248, 0.1);
    border-right-color: rgba(56, 189, 248, 0.45);
}

body.orbit-home-screen .sidebar .menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 8px;
}

.orbit-hym-sidebar-foot {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px 14px;
    border-top: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(4, 10, 22, 0.6);
}

.orbit-hym-sys {
    flex: 1 1 0;
    min-width: 0;
    background: rgba(8, 18, 36, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 0;
}

.orbit-hym-sys h4 {
    margin: 0 0 8px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
}

.orbit-hym-sys-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 3px 0;
    color: #94a3b8;
}

.orbit-hym-sys-row span:last-child {
    color: #22c55e;
    font-weight: 600;
    font-size: 10px;
}

.orbit-hym-uptime {
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 6px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 10px;
    background: rgba(8, 18, 36, 0.6);
}

.orbit-hym-uptime__radar {
    width: 52px;
    height: 52px;
    margin: 0 auto 6px;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background:
        repeating-radial-gradient(circle at center, transparent 0 8px, rgba(56, 189, 248, 0.06) 8px 9px),
        radial-gradient(circle at center, rgba(56, 189, 248, 0.25), transparent 55%);
    position: relative;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.15);
}

.orbit-hym-uptime__radar::after {
    content: "";
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 16px #38bdf8;
    animation: orbit-hym-pulse 2s ease-in-out infinite;
}

@keyframes orbit-hym-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.88); }
}

.orbit-hym-uptime__label {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #94a3b8;
    text-transform: uppercase;
}

.orbit-hym-uptime__value {
    font-family: Orbitron, sans-serif;
    font-size: 11px;
    color: #67e8f9;
    margin-top: 2px;
    letter-spacing: 0.04em;
    line-height: 1.25;
}

/* ─── Top bar ─── */
.orbit-home-shell .orbit-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 16, 32, 0.92);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 120;
}

.orbit-topbar-theme-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.orbit-theme-toggle,
.orbit-theme-picker-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 18, 36, 0.9);
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.orbit-theme-toggle:hover,
.orbit-theme-picker-btn:hover {
    color: #67e8f9;
    border-color: rgba(56, 189, 248, 0.45);
}

.orbit-home-shell .orbit-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 18, 36, 0.9);
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.orbit-home-shell .orbit-menu-toggle:hover {
    color: #67e8f9;
    border-color: rgba(56, 189, 248, 0.45);
}

.orbit-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.orbit-topbar-brand__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #67e8f9;
    font-size: 14px;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.orbit-topbar-brand__text {
    font-family: Orbitron, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: #67e8f9;
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
    line-height: 1.1;
}

.orbit-topbar-brand__sub {
    font-size: 8px;
    letter-spacing: 0.18em;
    color: #64748b;
    text-transform: uppercase;
}

.orbit-home-shell .orbit-search {
    flex: 1 1 auto;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

.orbit-home-shell .orbit-search input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(6, 12, 24, 0.9);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.orbit-home-shell .orbit-search i {
    position: absolute;
    right: 14px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.orbit-sys-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.orbit-sys-pill__tag {
    font-size: 9px;
    letter-spacing: 0.14em;
    color: #64748b;
    font-weight: 600;
}

.orbit-sys-pill__state {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 0.04em;
}

.orbit-sys-pill__state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: orbit-hym-pulse 2s ease-in-out infinite;
}

.orbit-home-shell .orbit-topbar-spacer {
    flex: 1 1 auto;
    min-width: 8px;
}

.orbit-home-shell .orbit-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 0;
    margin-left: 0;
    flex-shrink: 0;
}

.orbit-home-shell .orbit-user--end {
    flex-shrink: 0;
    margin-inline-start: 0;
}

.orbit-topbar-user-block {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    background: rgba(8, 18, 36, 0.88);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.06);
}

.orbit-topbar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.orbit-topbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
}

.orbit-home-shell .orbit-topbar-user-btn {
    font-size: 22px;
    color: #67e8f9;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.orbit-home-shell .orbit-topbar-user-btn:hover {
    color: #a5f3fc;
}

.orbit-home-shell .user-dropdown .dropdown-menu {
    left: 0;
    right: auto;
    background: rgba(8, 18, 36, 0.98);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #e2e8f0;
    z-index: 200;
}

.orbit-home-shell .user-dropdown .dropdown-menu a {
    color: #e2e8f0;
}

.orbit-home-shell .user-dropdown .dropdown-menu a:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #67e8f9;
}

.orbit-session-info,
.orbit-session-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.orbit-session-info .label,
.orbit-session-date .label {
    color: #64748b;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

.orbit-session-info .label i,
.orbit-session-date .label i {
    color: #38bdf8;
}

.orbit-session-info .value,
.orbit-session-date .value {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 12px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orbit-session-info .separator {
    color: #475569;
    margin: 0 2px;
}

@media (max-width: 1200px) {
    .orbit-session-date {
        display: none;
    }
}

@media (max-width: 992px) {
    .orbit-topbar-user-info {
        flex-wrap: wrap;
        gap: 8px;
    }

    .orbit-session-info .value {
        max-width: 100px;
    }
}

/* ─── Dashboard scroll area ─── */
.orbit-home-dashboard {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.orbit-home-dashboard .page-title {
    display: none;
}

#dashboardContent.orbit-dash-inner {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding: 14px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#moduleContent {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: 24px;
}

/* ─── KPI row (5 cards, icon + sparkline) ─── */
.orbit-hym-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.orbit-hym-kpi {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    gap: 2px 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(10, 22, 40, 0.82);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.06);
    align-items: center;
    align-self: start;
}

.orbit-hym-kpi__icon {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.08);
}

.orbit-hym-kpi--green .orbit-hym-kpi__icon { color: #22c55e; border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.1); }
.orbit-hym-kpi--blue .orbit-hym-kpi__icon { color: #38bdf8; }
.orbit-hym-kpi--orange .orbit-hym-kpi__icon { color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }
.orbit-hym-kpi--purple .orbit-hym-kpi__icon { color: #a78bfa; border-color: rgba(167, 139, 250, 0.35); background: rgba(167, 139, 250, 0.1); }
.orbit-hym-kpi--red .orbit-hym-kpi__icon { color: #ef4444; border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.1); }

.orbit-hym-kpi__label {
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
    grid-column: 2;
}

.orbit-hym-kpi__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.24rem;
    font-weight: 700;
    color: #f1f5f9;
    grid-column: 2;
    line-height: 1;
}

.orbit-hym-kpi__trend {
    grid-column: 1 / -1;
    font-size: 9px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.orbit-hym-kpi__trend.up { color: #22c55e; }
.orbit-hym-kpi__trend.down { color: #ef4444; }

.orbit-hym-kpi__spark {
    grid-column: 1 / -1;
    width: 100%;
    height: 20px;
    display: block;
}

/* ─── Mid row: map + side panels ─── */
.orbit-hym-mid {
    --orbit-card-h: 118px;
    --orbit-card-gap: 8px;
    /* ارتفاع ثابت = 3.5 كارد + 50px (118×3.5 + 8×2.5 + 50 = 483px) */
    --orbit-cards-35-h: calc(3.5 * var(--orbit-card-h) + 2.5 * var(--orbit-card-gap) + 50px);
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 12px;
    align-items: stretch;
}

.orbit-hym-mid > .orbit-panel--map {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
}

.orbit-panel--map .orbit-panel__body--map-host {
    padding: 0;
    height: var(--orbit-cards-35-h);
    min-height: var(--orbit-cards-35-h);
    max-height: var(--orbit-cards-35-h);
    flex: 0 0 var(--orbit-cards-35-h);
}

.orbit-home-map-shell.sd-panel-body--map,
.orbit-home-map-shell {
    position: relative;
    height: var(--orbit-cards-35-h) !important;
    min-height: var(--orbit-cards-35-h) !important;
    max-height: var(--orbit-cards-35-h) !important;
    padding: 0 !important;
}

.orbit-home-map-el.sd-dash-map,
.orbit-home-map-el.sd-dash-map.leaflet-container {
    height: var(--orbit-cards-35-h) !important;
    min-height: var(--orbit-cards-35-h) !important;
    max-height: var(--orbit-cards-35-h) !important;
    width: 100%;
    border-radius: 0 0 10px 10px;
    z-index: 1;
}

.orbit-map-status {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 8px;
}

.orbit-hym-loading,
.orbit-hym-error {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 4px;
}

.orbit-hym-loading {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #67e8f9;
}

.orbit-hym-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.orbit-panel__tools .sd-map-head-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 18, 36, 0.9);
    color: #94a3b8;
    cursor: pointer;
}

.orbit-panel__tools .sd-map-head-btn:hover {
    color: #67e8f9;
    border-color: rgba(56, 189, 248, 0.45);
}

.orbit-hym-side-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    flex: 1 1 auto;
    height: 100%;
    max-height: calc(var(--orbit-cards-35-h) + 49px);
}

.orbit-hym-side-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    gap: 12px;
    align-self: stretch;
    height: calc(var(--orbit-cards-35-h) + 49px);
    max-height: calc(var(--orbit-cards-35-h) + 49px);
}

.orbit-hym-side-column > .orbit-hym-side-stack[hidden],
.orbit-hym-side-column > .orbit-panel--map-devices[hidden],
.orbit-hym-side-column > .orbit-panel--map-stations[hidden] {
    display: none !important;
}

.orbit-panel--map-stations {
    flex: 1 1 auto;
    height: 100%;
    max-height: calc(var(--orbit-cards-35-h) + 49px);
    min-height: calc(var(--orbit-cards-35-h) + 49px);
    display: flex;
    flex-direction: column;
}

.orbit-panel__head--map-stations {
    flex-wrap: wrap;
    gap: 4px 8px;
}

.orbit-panel__body--map-stations {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px 10px !important;
    overflow: hidden;
}

.orbit-panel--map-stations .view-all-table.oh-map-substation-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.oh-map-substation-table-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 2px solid #4a5568;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(8, 18, 36, 0.35);
    --oh-col-pin: 40px;
    --oh-col-ss: 100px;
    --oh-col-neig: auto;
}

.oh-map-substation-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

#oh_sector_substation_table,
#oh_sector_substation_table_body_table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
}

#oh_sector_substation_table col.oh-col-pin,
#oh_sector_substation_table_body_table col.oh-col-pin {
    width: var(--oh-col-pin);
}

#oh_sector_substation_table col.oh-col-ss,
#oh_sector_substation_table_body_table col.oh-col-ss {
    width: var(--oh-col-ss);
}

#oh_sector_substation_table col.oh-col-neig,
#oh_sector_substation_table_body_table col.oh-col-neig {
    width: var(--oh-col-neig, auto);
}

#oh_sector_substation_table col.col-hidden,
#oh_sector_substation_table_body_table col.col-hidden {
    width: 0 !important;
}

#oh_sector_substation_table th.col-hidden,
#oh_sector_substation_table_body td.col-hidden {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

#oh_sector_substation_table thead th,
#oh_sector_substation_table_body td {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#oh_sector_substation_table thead > tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #2d3748;
    color: #e2e8f0;
    font-size: 11px;
    padding: 3px 4px;
    border-bottom: 1px solid #4a5568;
    vertical-align: middle;
    text-align: center;
}

#oh_sector_substation_table_body td {
    font-size: 11px;
    padding: 3px 4px;
    border-bottom: 1px solid rgba(74, 85, 104, 0.45);
    color: #cbd5e0;
    vertical-align: middle;
}

#oh_sector_substation_table_body td[data-field="ss_no1"] {
    direction: ltr;
    text-align: center;
}

#oh_sector_substation_table_body td[data-field="neig"] {
    text-align: center;
}

#oh_sector_substation_table_body td:first-child {
    text-align: center;
    padding: 2px;
}

#oh_sector_substation_table_body tr.oh-map-station-pinned,
#oh_sector_substation_table_body tr.oh-map-station-pinned td {
    background: rgba(34, 197, 94, 0.14) !important;
}

#oh_sector_substation_table_body .station-toolbar-btn {
    display: inline-block;
    min-width: 34px;
    padding: 2px 4px;
    font-size: 10px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(8, 18, 36, 0.85);
    color: #67e8f9;
    cursor: pointer;
}

#oh_sector_substation_table_body .sumorder-stations-placeholder-row td.loading {
    text-align: center;
    padding: 16px 8px;
    color: #94a3b8;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .oh-map-substation-table-shell,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .oh-map-substation-table-shell {
    background: var(--input-bg);
    border-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table thead > tr:first-child th,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table thead > tr:first-child th {
    background: var(--table-header-bg, #edf2f7);
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table_body td,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table_body td {
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

.sigma-map-marker-popup .leaflet-popup-content {
    direction: ltr;
    text-align: left;
    margin: 8px 28px 8px 12px;
    min-width: 72px;
    font-size: 14px;
    font-weight: 600;
}

.sigma-map-marker-popup .sigma-map-marker-popup-inner {
    direction: ltr;
    text-align: left;
}

#oh_sector_substation_table thead,
#oh_sector_substation_table thead tr,
#oh_sector_substation_table thead th,
#oh_sector_substation_table tr.filter-row,
#oh_sector_substation_table tr.filter-row th {
    overflow: visible !important;
}

#oh_sector_substation_table tr.sumorder-station-filter-row th {
    padding: 1px 3px !important;
    height: auto !important;
    min-height: 0 !important;
    background: #374151;
    border-bottom: 1px solid #4a5568;
    position: sticky !important;
    top: 28px !important;
    z-index: 3;
}

#oh_sector_substation_table tr.sumorder-station-filter-row th:has(.filter-menu.open) {
    z-index: 100;
}

#oh_sector_substation_table .filter-toggle {
    padding: 1px 3px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    min-height: 20px;
    border-radius: 3px;
}

#oh_sector_substation_table .filter-menu {
    position: relative;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 30;
}

#oh_sector_substation_table .filter-menu .filter-toggle {
    width: 100%;
    padding: 3px 4px;
    font-size: 10px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 4px;
    background: rgba(8, 18, 36, 0.92);
    color: #cbd5e1;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

#oh_sector_substation_table .filter-menu .filter-toggle:hover {
    color: #67e8f9;
    border-color: rgba(56, 189, 248, 0.45);
}

#oh_sector_substation_table .filter-menu .filter-dropdown.oh-map-filter-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    display: none;
    flex-direction: column;
    gap: 8px;
    width: min(240px, 92vw);
    min-width: 200px;
    max-width: min(280px, 92vw);
    max-height: min(320px, 70vh);
    overflow: hidden;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #475569;
    background: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
    z-index: 9999;
    text-align: right;
    direction: rtl;
    box-sizing: border-box;
}

#oh_sector_substation_table .filter-menu.open .filter-dropdown.oh-map-filter-dropdown,
#oh_sector_substation_table .filter-dropdown.oh-map-filter-dropdown.oh-map-filter-dropdown-portal,
.oh-map-filter-dropdown.oh-map-filter-dropdown-portal {
    display: flex !important;
}

/* قائمة الفلتر عند نقلها إلى body */
.oh-map-filter-dropdown.oh-map-filter-dropdown-portal {
    position: fixed !important;
    flex-direction: column;
    gap: 8px;
    width: min(240px, 92vw);
    min-width: 200px;
    max-width: min(280px, 92vw);
    max-height: min(320px, 70vh);
    overflow: hidden;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #475569;
    background: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
    z-index: 15000 !important;
    text-align: right;
    direction: rtl;
    box-sizing: border-box;
    pointer-events: auto;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-search,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-search {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
    font-size: 12px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    direction: rtl;
    text-align: right;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-search:focus,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-search:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-search::placeholder,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-search::placeholder {
    color: #94a3b8;
    font-size: 11px;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-select-all-wrap,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-select-all-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-select-all-wrap input[type="checkbox"],
#oh_sector_substation_table .oh-map-filter-dropdown .filter-select-all-wrap input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-select-all-wrap label,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-select-all-wrap label {
    cursor: pointer;
    user-select: none;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-options,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-options {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 180px;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 6px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    scrollbar-width: thin;
    scrollbar-color: #475569 #0f172a;
}

#oh_sector_substation_table .oh-map-filter-dropdown .filter-options::-webkit-scrollbar {
    width: 6px;
}

#oh_sector_substation_table .oh-map-filter-dropdown .filter-options::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

#oh_sector_substation_table .oh-map-filter-dropdown .filter-option {
    margin: 0;
    padding: 0;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-option label,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-option label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #e2e8f0;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.12s ease;
    word-break: break-word;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-option label:hover,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-option label:hover {
    background: rgba(96, 165, 250, 0.15);
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-option input[type="checkbox"],
#oh_sector_substation_table .oh-map-filter-dropdown .filter-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-actions,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-actions {
    display: flex;
    gap: 8px;
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid #334155;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-actions button,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-actions button {
    flex: 1;
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-actions .apply-filter,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .apply-filter {
    background: #2563eb;
    color: #fff;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-actions .apply-filter:hover,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .apply-filter:hover {
    background: #1d4ed8;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-actions .clear-filter,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .clear-filter {
    background: #334155;
    color: #e2e8f0;
}

.oh-map-filter-dropdown.oh-map-filter-dropdown-portal .filter-actions .clear-filter:hover,
#oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .clear-filter:hover {
    background: #475569;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .filter-menu .filter-dropdown.oh-map-filter-dropdown,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .filter-menu .filter-dropdown.oh-map-filter-dropdown {
    background: #fff;
    color: #1e293b;
    border-color: #cbd5e0;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-search,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-search {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-select-all-wrap,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-select-all-wrap {
    color: #334155;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-options,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-options {
    background: #f8fafc;
    border-color: #e2e8f0;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-option label,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-option label {
    color: #1e293b;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-option label:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-option label:hover {
    background: rgba(37, 99, 235, 0.1);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-actions,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-actions {
    border-top-color: #e2e8f0;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .clear-filter,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .clear-filter {
    background: #e2e8f0;
    color: #334155;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .clear-filter:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table .oh-map-filter-dropdown .filter-actions .clear-filter:hover {
    background: #cbd5e1;
}

#oh_sector_substation_table thead tr.sumorder-station-filter-row th.filter-cell[data-field="ss_no1"] .filter-menu .filter-dropdown,
#oh_sector_substation_table thead tr.sumorder-station-filter-row th.filter-cell[data-field="neig"] .filter-menu .filter-dropdown {
    left: 0;
    right: auto;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) #oh_sector_substation_table tr.sumorder-station-filter-row th,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) #oh_sector_substation_table tr.sumorder-station-filter-row th {
    background: var(--table-header-bg, #edf2f7);
    border-bottom-color: var(--border-color);
}

.orbit-panel--map-devices {
    flex: 1 1 auto;
    height: 100%;
    max-height: calc(var(--orbit-cards-35-h) + 49px);
    min-height: calc(var(--orbit-cards-35-h) + 49px);
    display: flex;
    flex-direction: column;
}

.orbit-panel__head--map-devices {
    flex-wrap: wrap;
    gap: 4px 8px;
}

.orbit-map-devices-status {
    display: block;
    width: 100%;
    font-size: 10px;
    color: #64748b;
    text-align: left;
    direction: ltr;
}

.orbit-panel__body--map-devices {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px 10px !important;
    overflow: hidden;
}

.orbit-map-device-list.sd-map-device-list {
    --sd-map-device-card-h: var(--orbit-card-h, 118px);
    --sd-map-device-gap: var(--orbit-card-gap, 8px);
    flex: 0 0 var(--orbit-cards-35-h);
    width: 100%;
    height: var(--orbit-cards-35-h);
    min-height: var(--orbit-cards-35-h);
    max-height: var(--orbit-cards-35-h);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(8, 16, 32, 0.55);
}

.orbit-panel__body--map-devices .orbit-map-device-list.sd-map-device-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.orbit-map-device-list.sd-map-device-list::-webkit-scrollbar {
    width: 7px;
}

.orbit-map-device-list.sd-map-device-list::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.45);
    border-radius: 4px;
}

.orbit-map-device-list.sd-map-device-list::-webkit-scrollbar-track {
    background: rgba(8, 16, 32, 0.55);
}

.orbit-map-device-list.sd-map-device-list li {
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(8, 18, 36, 0.72);
}

.orbit-map-device-list.sd-map-device-list li:hover,
.orbit-map-device-list.sd-map-device-list li.is-active {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.08);
}

.orbit-map-devices-empty {
    margin: 0;
    padding: 16px 8px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

.orbit-map-devices-empty.hidden {
    display: none !important;
}

.orbit-panel__tools .sd-map-head-btn.is-active {
    color: #67e8f9;
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.14);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.orbit-hym-side-stack .orbit-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.orbit-hym-side-stack .orbit-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* حالات المحطات */
body.orbit-home-screen .orbit-alerts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 100%;
    overflow-y: auto;
}

body.orbit-home-screen .orbit-alert-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(6, 12, 24, 0.6);
    font-size: 12px;
}

body.orbit-home-screen .orbit-alert-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

body.orbit-home-screen .orbit-alert-icon--red {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

body.orbit-home-screen .orbit-alert-icon--orange {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

body.orbit-home-screen .orbit-alert-body {
    flex: 1;
    min-width: 0;
}

body.orbit-home-screen .orbit-alert-station {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

body.orbit-home-screen .orbit-alert-msg {
    color: #94a3b8;
    font-size: 11px;
}

/* Work orders list */
/* Work orders / stations table */
.orbit-panel__count {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.04em;
    margin-inline-start: 6px;
}

.orbit-panel__body--stations-table {
    padding: 8px 10px 10px !important;
    overflow: visible;
}

.orbit-stations-table-wrap {
    --orbit-station-row-h: 40px;
    overflow: visible;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(6, 12, 24, 0.45);
}

.orbit-stations-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 11px;
}

.orbit-stations-table thead th:nth-child(1) {
    width: 110px;
}

.orbit-stations-table thead th:nth-child(2) {
    width: 100px;
}

.orbit-stations-table thead th:nth-child(3) {
    width: 88px;
}

.orbit-stations-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 6px 8px;
    text-align: right;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    background: rgba(8, 18, 36, 0.98);
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
    white-space: nowrap;
    vertical-align: middle;
}

.orbit-stations-table thead th .orbit-stations-th-label {
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}

.orbit-stations-table thead th .orbit-stations-col-width {
    width: 44px;
    min-width: 44px;
    max-width: 52px;
    padding: 2px 4px;
    margin: 0;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 4px;
    background: rgba(6, 12, 24, 0.85);
    color: #67e8f9;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    -moz-appearance: textfield;
}

.orbit-stations-table thead th .orbit-stations-col-width::-webkit-outer-spin-button,
.orbit-stations-table thead th .orbit-stations-col-width::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.orbit-stations-table thead th .orbit-stations-col-width:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.orbit-stations-table thead th .sigma-col-resize-handle {
    z-index: 4;
}

.orbit-stations-table thead th .sigma-col-resize-handle:hover,
body.sigma-table-col-resizing .orbit-stations-table thead th .sigma-col-resize-handle {
    background: rgba(56, 189, 248, 0.35);
}

.orbit-stations-table tbody td {
    padding: 0 10px;
    height: var(--orbit-station-row-h);
    vertical-align: middle;
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
    color: #e2e8f0;
}

.orbit-stations-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.06);
}

.orbit-stations-table__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: #e2e8f0;
}

/* عمود رقم المحطة ss_no1 — LTR ومحاذاة يسار */
.orbit-stations-table thead th[data-col-field="ss_no1"],
.orbit-stations-table tbody td[data-col-field="ss_no1"] {
    direction: ltr;
    text-align: left !important;
    unicode-bidi: plaintext;
}

.orbit-stations-table thead th[data-col-field="ss_no1"] .orbit-stations-th-label {
    margin-right: 0;
    margin-left: 0;
}

.orbit-stations-table__region {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #94a3b8;
}

.orbit-stations-table__status {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #38bdf8;
    font-weight: 600;
}

.orbit-stations-table .orbit-wo-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
}

.orbit-wo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.orbit-wo-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.orbit-wo-item:last-child {
    border-bottom: none;
}

.orbit-wo-id {
    font-family: Orbitron, sans-serif;
    font-size: 11px;
    color: #67e8f9;
    flex-shrink: 0;
}

.orbit-wo-body {
    flex: 1;
    min-width: 0;
}

.orbit-wo-title {
    font-size: 12px;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.orbit-wo-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.orbit-wo-tag--progress { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.orbit-wo-tag--done { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.35); }
.orbit-wo-tag--hold { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }

.orbit-wo-time {
    font-size: 10px;
    color: #64748b;
    flex-shrink: 0;
}

/* ─── Bottom row ─── */
.orbit-hym-bottom {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1fr 0.85fr;
    gap: 12px;
    min-height: 200px;
}

.orbit-hym-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.orbit-hym-photo {
    aspect-ratio: 4/3;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(8, 18, 36, 0.9));
    overflow: hidden;
    position: relative;
}

.orbit-hym-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.orbit-hym-photo__ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(56, 189, 248, 0.35);
    font-size: 1.5rem;
}

.orbit-hym-maint-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.orbit-hym-maint-center strong {
    font-family: Orbitron, sans-serif;
    font-size: 1.25rem;
    color: #67e8f9;
}

.orbit-hym-maint-center span {
    font-size: 9px;
    color: #94a3b8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.orbit-station-popup__actions .orbit-btn-outline {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #67e8f9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
}

/* Hide default home header when orbit topbar is used */
.orbit-home-shell > .header {
    display: none;
}

/* Module open: hide dashboard */
.orbit-home-dashboard.sigma-module-open #dashboardContent,
body.orbit-home-screen.sigma-module-open .orbit-home-dashboard #dashboardContent {
    display: none !important;
}

body.orbit-home-screen.sigma-module-open .orbit-home-dashboard .page-title,
.orbit-home-dashboard.sigma-module-open .page-title {
    display: block !important;
    margin: 12px 16px 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    text-shadow: none;
    box-shadow: 0 0 16px color-mix(in srgb, var(--accent-color) 10%, transparent);
}

body.orbit-home-screen #moduleContent {
    flex: 1 1 auto;
    min-height: 0;
}

@media (max-width: 1400px) {
    .orbit-hym-kpi-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .orbit-hym-bottom {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1100px) {
    .orbit-hym-mid {
        grid-template-columns: 1fr;
    }
    .orbit-hym-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .orbit-hym-kpi-row,
    .orbit-hym-bottom {
        grid-template-columns: 1fr;
    }
}

/* RTL map overlays */
body.orbit-home-screen .orbit-map-legend {
    left: auto;
    right: 12px;
}

body.orbit-home-screen .orbit-map-zoom {
    left: auto;
    right: 12px;
}

body.orbit-home-screen .orbit-station-popup {
    right: auto;
    left: 16%;
}

body.orbit-home-screen .orbit-station-popup dt {
    float: right;
    clear: right;
}

body.orbit-home-screen .orbit-station-popup dd {
    text-align: left;
}

body.orbit-home-screen .orbit-badge-count {
    right: auto;
    left: -4px;
}

/* ─── الوضع الفاتح (Frm_Home) ─── */
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode),
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) {
    --orbit-bg: var(--bg-body);
    --orbit-bg-2: #e0f2fe;
    --orbit-panel: var(--card-bg);
    --orbit-border: var(--border-color);
    --orbit-border-strong: color-mix(in srgb, var(--accent-color) 45%, transparent);
    --orbit-cyan: var(--accent-color);
    --orbit-cyan-bright: var(--accent-hover);
    --orbit-text: var(--text-primary);
    --orbit-muted: var(--text-secondary);
    --orbit-glow: 0 0 20px color-mix(in srgb, var(--accent-color) 12%, transparent);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .main-content.orbit-home-shell,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .main-content.orbit-home-shell {
    scrollbar-color: color-mix(in srgb, var(--accent-color) 35%, transparent) #e2e8f0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(2, 132, 199, 0.1), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 50%, rgba(14, 165, 233, 0.06), transparent 50%),
        var(--bg-body);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .orbit-topbar,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .orbit-topbar {
    background: var(--header-bg);
    border-bottom-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-theme-toggle,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-theme-picker-btn,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-theme-toggle,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-theme-picker-btn,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .orbit-menu-toggle,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .orbit-menu-toggle,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-panel__tools .sd-map-head-btn,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-panel__tools .sd-map-head-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-topbar-user-name,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-topbar-user-name,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-session-info .value,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-session-info .value,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-session-date .value,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-session-date .value {
    color: var(--text-primary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-kpi,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-kpi {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--orbit-glow);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-kpi__label,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-kpi__label {
    color: var(--text-secondary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-kpi__value,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-kpi__value {
    color: var(--text-primary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-panel,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-panel {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--orbit-glow);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-panel__title,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-panel__title {
    color: var(--accent-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-map-status,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-map-status,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-map-devices-status,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-map-devices-status,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-panel__count,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-panel__count {
    color: var(--text-secondary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table-wrap,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table-wrap {
    background: var(--input-bg);
    border-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table thead th,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table thead th {
    background: color-mix(in srgb, var(--accent-color) 10%, var(--card-bg));
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table tbody td,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table tbody td {
    color: var(--text-primary);
    border-bottom-color: color-mix(in srgb, var(--border-color) 60%, transparent);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table__region,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table__region {
    color: var(--text-secondary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table thead th .orbit-stations-col-width,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table thead th .orbit-stations-col-width {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--accent-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table__status,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table__status {
    color: var(--accent-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-map-device-list.sd-map-device-list li,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-map-device-list.sd-map-device-list li {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-alert-item,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-alert-item {
    border-color: var(--border-color);
    background: var(--input-bg);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-alert-station,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-alert-station {
    color: var(--text-primary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-alert-msg,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-alert-msg {
    color: var(--text-secondary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-loading,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-loading {
    background: color-mix(in srgb, var(--accent-color) 8%, var(--card-bg));
    border-color: var(--border-color);
    color: var(--accent-hover);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-sidebar-foot .orbit-hym-uptime,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-sidebar-foot .orbit-hym-uptime {
    background: var(--input-bg);
    border-color: var(--border-color);
}

/* sidebar */
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar.orbit-hym-sidebar,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar.orbit-hym-sidebar {
    background: linear-gradient(180deg, var(--sidebar-bg-start), var(--sidebar-bg-end));
    border-left-color: var(--border-color);
    box-shadow: -4px 0 20px rgba(15, 23, 42, 0.08);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar.orbit-hym-sidebar .brand,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar.orbit-hym-sidebar .brand {
    color: var(--accent-hover);
    background: rgba(0, 0, 0, 0.12);
    border-bottom-color: var(--border-color);
    text-shadow: none;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar .section-toggle,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar .section-toggle {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar .section-toggle:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar .section-toggle:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar .section-toggle.active,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar .section-toggle.active {
    background: var(--sidebar-active);
    color: var(--accent-hover);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar .menu a,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar .menu a {
    color: color-mix(in srgb, var(--sidebar-text) 82%, transparent);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar .menu a:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar .menu a:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .sidebar .menu a.active-link,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .sidebar .menu a.active-link {
    color: var(--accent-hover);
    background: var(--sidebar-active);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-sidebar-foot,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-sidebar-foot {
    background: rgba(0, 0, 0, 0.1);
    border-top-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-sys,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-sys {
    background: rgba(0, 0, 0, 0.12);
    border-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-sys h4,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-sys h4,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-sys-row,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-sys-row {
    color: color-mix(in srgb, var(--sidebar-text) 75%, transparent);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-uptime__label,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-uptime__label {
    color: color-mix(in srgb, var(--sidebar-text) 70%, transparent);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-uptime__value,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-uptime__value {
    color: var(--accent-hover);
}

/* topbar */
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .orbit-search input,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .orbit-search input {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .orbit-search i,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .orbit-search i {
    color: var(--text-light);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-topbar-brand__text,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-topbar-brand__text,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .orbit-topbar-user-btn,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .orbit-topbar-user-btn {
    color: var(--accent-color);
    text-shadow: none;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-topbar-brand__icon,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-topbar-brand__icon {
    border-color: var(--border-color);
    color: var(--accent-color);
    box-shadow: none;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-topbar-brand__sub,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-topbar-brand__sub,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-session-info .label,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-session-info .label,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-session-date .label,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-session-date .label {
    color: var(--text-light);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-topbar-user-block,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-topbar-user-block {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: none;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .user-dropdown .dropdown-menu,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .user-dropdown .dropdown-menu {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .user-dropdown .dropdown-menu a,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .user-dropdown .dropdown-menu a {
    color: var(--text-primary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-theme-toggle:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-theme-toggle:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-theme-picker-btn:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-theme-picker-btn:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-home-shell .orbit-menu-toggle:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-home-shell .orbit-menu-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* panels & charts */
body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-panel__tools button,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-panel__tools button {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-panel__tools button:hover,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-panel__tools button:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-chart-box,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-chart-box {
    background: var(--input-bg);
    border-color: var(--border-color);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-stations-table tbody tr:hover td,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-stations-table tbody tr:hover td {
    background: color-mix(in srgb, var(--accent-color) 6%, transparent);
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .main-content.orbit-home-shell::-webkit-scrollbar-track,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .main-content.orbit-home-shell::-webkit-scrollbar-track {
    background: #e2e8f0;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .main-content.orbit-home-shell::-webkit-scrollbar-thumb,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .main-content.orbit-home-shell::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--accent-color) 40%, transparent);
    border-color: #e2e8f0;
}

body.orbit-home-screen.sigma-theme-base-dash-orbit-yhm:not(.dark-mode) .orbit-hym-kpi__trend.neutral,
body.orbit-home-screen.sigma-theme-base-dash-orbit-hym:not(.dark-mode) .orbit-hym-kpi__trend.neutral {
    color: var(--text-secondary);
}

/* ——— موديول تحديد الموقع HUD ——— */
body.oh-map-loc-modal-open {
    overflow: hidden;
}

.oh-map-loc-modal {
    position: fixed;
    inset: 0;
    z-index: 100600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.oh-map-loc-modal.hidden {
    display: none !important;
}

.oh-map-loc-modal__fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.oh-map-loc-modal__grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background:
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
}

.oh-map-loc-modal__scan {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 55% at 50% 45%, rgba(0, 140, 220, 0.12) 0%, transparent 62%);
}

.oh-map-loc-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(2, 8, 18, 0.72);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.oh-map-loc-modal__shell {
    position: relative;
    z-index: 2;
    width: min(96vw, 460px);
    padding: 2px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.65), rgba(0, 90, 180, 0.25), rgba(0, 229, 255, 0.5));
    box-shadow:
        0 0 48px rgba(0, 180, 255, 0.28),
        0 20px 60px rgba(0, 0, 0, 0.55);
    animation: ohMapLocModalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ohMapLocModalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(18px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.oh-map-loc-modal__panel {
    position: relative;
    border-radius: 2px;
    padding: 18px 18px 16px;
    background:
        linear-gradient(180deg, rgba(4, 18, 36, 0.98) 0%, rgba(2, 10, 24, 0.99) 100%);
    overflow: hidden;
}

.oh-map-loc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.oh-map-loc-modal__tag {
    display: block;
    font-family: Orbitron, "Segoe UI", sans-serif;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: rgba(103, 232, 249, 0.85);
    margin-bottom: 4px;
}

.oh-map-loc-modal__title {
    margin: 0;
    font-family: Orbitron, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #e0f2fe;
    letter-spacing: 0.04em;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.oh-map-loc-modal__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 6px;
    background: rgba(8, 18, 36, 0.85);
    color: #67e8f9;
    cursor: pointer;
}

.oh-map-loc-modal__close:hover {
    background: rgba(56, 189, 248, 0.15);
}

.oh-map-loc-modal__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oh-map-loc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.oh-map-loc-field label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.oh-map-loc-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 8px;
    background: rgba(3, 12, 26, 0.92);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oh-map-loc-input:focus {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.oh-map-loc-input:read-only,
.oh-map-loc-input.oh-map-loc-input--readonly {
    opacity: 0.62;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(148, 163, 184, 0.22);
}

.oh-map-loc-input:read-only:focus,
.oh-map-loc-input.oh-map-loc-input--readonly:focus {
    box-shadow: none;
    border-color: rgba(148, 163, 184, 0.22);
}

.oh-map-loc-coords-row {
    display: flex;
    gap: 10px;
}

.oh-map-loc-field--half {
    flex: 1 1 0;
    min-width: 0;
}

.oh-map-loc-modal__hint {
    min-height: 18px;
    margin: 0;
    font-size: 11px;
    color: #64748b;
}

.oh-map-loc-modal__hint.is-error {
    color: #fca5a5;
}

.oh-map-loc-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.oh-map-loc-btn {
    flex: 1;
    min-height: 40px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
}

.oh-map-loc-btn--primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    box-shadow: 0 0 18px rgba(2, 132, 199, 0.35);
}

.oh-map-loc-btn--primary:hover {
    filter: brightness(1.08);
}

.oh-map-loc-btn--ghost {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(100, 116, 139, 0.45);
    color: #cbd5e1;
}

.oh-map-loc-btn--ghost:hover {
    border-color: rgba(56, 189, 248, 0.4);
    color: #67e8f9;
}
