/* =============================================================================
   Xealio Connect — sayfa duzeyi stiller
   tokens.css ve components.css uzerine biner. Renk sabiti yoktur.
   ========================================================================== */

/* ---- Marka ---------------------------------------------------------------- */

.xc-logo {
  width: 18px; height: 18px; flex: none;
  background: var(--xc-green);
  border-radius: 4px 12px 12px 4px;
}

.xc-wordmark {
  font: var(--xc-t-body-md);
  letter-spacing: .14em;
  color: var(--xc-navy);
}
.xc-wordmark b { font-weight: 700; }

:root[data-theme="dark"] .xc-wordmark { color: var(--xc-text); }

/* ---- Kenar cubugu alt bolumu ------------------------------------------------ */

.xc-sidebar__foot {
  margin-top: auto;
  padding-top: var(--xc-4);
  border-top: 1px solid var(--xc-line);
}
.xc-sidebar__foot .xc-btn { min-height: 34px; padding: 0 var(--xc-3); }
.xc-sidebar__foot .xc-btn.is-active { background: var(--xc-nav-bg-active); font-weight: 600; }

/* ---- Filo ozeti -------------------------------------------------------------- */

.xc-summary {
  display: grid; gap: var(--xc-3);
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-bottom: var(--xc-5);
}

.xc-summary__cell {
  background: var(--xc-surface);
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
  padding: var(--xc-4);
  display: grid; gap: 2px;
}
.xc-summary__cell b { font: var(--xc-t-h1); letter-spacing: -.01em; }
.xc-summary__cell b.is-ok    { color: var(--xc-ok-text); }
.xc-summary__cell b.is-warn  { color: var(--xc-warn-text); }
.xc-summary__cell b.is-fault { color: var(--xc-fault-text); }
.xc-summary__cell span { font: var(--xc-t-small); color: var(--xc-text-muted); }

/* ---- Arac cubugu ---------------------------------------------------------------- */

.xc-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--xc-3);
  align-items: center; margin-bottom: var(--xc-5);
}
.xc-toolbar .xc-search { flex: 1 1 260px; }

/* ---- Form alanlari ---------------------------------------------------------------- */

.xc-field { display: grid; gap: var(--xc-2); }
.xc-field__label { font: var(--xc-t-small); color: var(--xc-text-muted); }

.xc-field__input {
  width: 100%; min-height: var(--xc-tap);
  padding: 0 var(--xc-4);
  background: var(--xc-surface);
  color: var(--xc-text);
  border: 1px solid var(--xc-line-strong);
  border-radius: var(--xc-r-md);
  font: var(--xc-t-body);
}
.xc-field__input:focus { outline: 2px solid var(--xc-navy-bright); outline-offset: 1px; }

.xc-field__wrap { position: relative; display: block; }
.xc-field__wrap .xc-field__input { padding-right: 48px; }

.xc-field__toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border: 0; background: none; cursor: pointer;
  color: var(--xc-text-muted); font-size: 16px;
}

/* ---- Giris sayfasi ---------------------------------------------------------------- */

.xc-login-page {
  display: grid; place-items: center;
  min-height: 100dvh;
  padding: var(--xc-6);
}

.xc-login { width: 100%; max-width: 400px; }
.xc-login__brand { display: flex; align-items: center; gap: var(--xc-2); margin-bottom: var(--xc-2); }
.xc-login__lede { font: var(--xc-t-small); color: var(--xc-text-muted); margin-bottom: var(--xc-5); }
.xc-login__card { box-shadow: var(--xc-shadow-float); }

/* ---- Tesis sayfasi ------------------------------------------------------------------ */

.xc-page-head .xc-btn--quiet { margin-bottom: var(--xc-1); }

#plantAlarmBar:empty { display: none; }

/* ---- Mobil ---------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .xc-summary { grid-template-columns: repeat(2, 1fr); }
  .xc-toolbar { gap: var(--xc-2); }
}

/* ---- Olaylar sekmesi ------------------------------------------------------- */

.xc-chip__n { color: var(--xc-text-faint); font-variant-numeric: var(--xc-nums); }
.xc-chip[aria-pressed="true"] .xc-chip__n { color: inherit; }

.xc-ack { min-height: 30px; padding: 0 var(--xc-3); font: var(--xc-t-meta); }

/* Açık alarm satırını sol kenardan işaretle */
.xc-log:has(.xc-badge.is-warn) { border-left: 3px solid var(--xc-warn-mark); }
.xc-log .xc-log__day + & { border-left: 0; }

@media (max-width: 600px) {
  .xc-log { grid-template-columns: 44px 32px 1fr; }
  .xc-log__icon { width: 32px; height: 32px; }
}

/* ---- Ortak ekipman alarmlari --------------------------------------------- */

.xc-alarm-page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--xc-4); margin-bottom: var(--xc-5);
}
.xc-alarm-toolbar { align-items: end; }
.xc-alarm-field { display: grid; gap: 5px; min-width: 170px; }
.xc-alarm-field label { color: var(--xc-text-muted); font: var(--xc-t-meta); }
.xc-alarm-toolbar .xc-alarm-plant-filter { width: min(100%, 280px); }
.xc-alarm-list-card { padding: 0; overflow: hidden; }
.xc-alarm-list { display: grid; }
.xc-alarm-row {
  display: grid; grid-template-columns: 120px minmax(220px, 1fr) minmax(440px, 1.45fr);
  gap: var(--xc-4); align-items: center; padding: var(--xc-4) var(--xc-5);
  border-bottom: 1px solid var(--xc-line); position: relative;
}
.xc-alarm-row:last-child { border-bottom: 0; }
.xc-alarm-row.is-active { background: var(--xc-fault-soft); }
.xc-alarm-row.is-active::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--xc-fault-mark);
}
.xc-alarm-row__status { display: flex; align-items: center; gap: var(--xc-2); }
.xc-alarm-pulse { display: none; width: 10px; height: 10px; border-radius: 50%; background: var(--xc-fault-mark); }
.xc-alarm-row.is-active .xc-alarm-pulse { display: block; animation: xc-alarm-blink 1s steps(2, start) infinite; }
@keyframes xc-alarm-blink { 50% { opacity: .15; transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) { .xc-alarm-row.is-active .xc-alarm-pulse { animation: none; } }
.xc-alarm-row__main { min-width: 0; }
.xc-alarm-row__plant { color: var(--xc-navy-bright); font: var(--xc-t-small); font-weight: 700; text-decoration: none; }
.xc-alarm-row__plant:hover { text-decoration: underline; }
.xc-alarm-row__plant-code { margin-left: var(--xc-2); color: var(--xc-text-faint); font: var(--xc-t-meta); }
.xc-alarm-row__equipment { margin-top: 4px; color: var(--xc-text); font: var(--xc-t-body-md); }
.xc-alarm-row__detail { color: var(--xc-text-muted); font: var(--xc-t-small); overflow-wrap: anywhere; }
.xc-alarm-row__times { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: var(--xc-3); margin: 0; }
.xc-alarm-row__times div { min-width: 0; }
.xc-alarm-row__times dt { color: var(--xc-text-faint); font: var(--xc-t-meta); }
.xc-alarm-row__times dd { margin: 3px 0 0; color: var(--xc-text); font: var(--xc-t-small); font-variant-numeric: var(--xc-nums); }
.xc-alarm-row.is-active .xc-alarm-duration { color: var(--xc-fault-text); font-weight: 700; }
.xc-alarm-more { padding: var(--xc-4); border-top: 1px solid var(--xc-line); text-align: center; }
.xc-alarm-list-card .xc-state-block { padding: var(--xc-8); }

@media (max-width: 1050px) {
  .xc-alarm-row { grid-template-columns: 105px 1fr; }
  .xc-alarm-row__times { grid-column: 1 / -1; padding-left: 121px; }
}
@media (max-width: 700px) {
  .xc-alarm-page-head { align-items: center; }
  .xc-alarm-toolbar .xc-alarm-plant-filter { width: 100%; }
  .xc-alarm-field { width: 100%; }
  .xc-alarm-row { grid-template-columns: 1fr; gap: var(--xc-3); padding: var(--xc-4); }
  .xc-alarm-row__times { grid-column: auto; padding-left: 0; grid-template-columns: 1fr 1fr; }
  .xc-alarm-row__times div:last-child { grid-column: 1 / -1; }
}

/* =============================================================================
   Tesis detay sayfası — yeni yerleşim
   Renkler tokens.css'ten gelir; bu bölüm yalnızca yerleşim ve ölçüdür.
   ========================================================================== */

.xc-main--plant { padding-top: var(--xc-4); }

/* ---- Kırıntı yolu ---------------------------------------------------------- */

.xc-crumbs {
  display: flex; align-items: center; gap: var(--xc-2);
  font: var(--xc-t-small); color: var(--xc-text-faint);
  margin-bottom: var(--xc-4);
}
.xc-crumbs a { color: var(--xc-navy-bright); text-decoration: none; }
.xc-crumbs a:hover { text-decoration: underline; }
.xc-crumbs__current { color: var(--xc-text-muted); }

/* ---- Başlık ---------------------------------------------------------------- */

.xc-plant-head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: var(--xc-4);
  margin-bottom: var(--xc-5);
}

.xc-plant-head__thumb {
  width: 72px; height: 56px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--xc-surface);
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
}
.xc-plant-head__thumb svg { width: 100%; height: auto; }

.xc-plant-head__title { display: flex; align-items: center; gap: var(--xc-3); flex-wrap: wrap; }
.xc-plant-head__title h1 { font: var(--xc-t-display); letter-spacing: -.02em; }
.xc-plant-head__meta { font: var(--xc-t-small); color: var(--xc-text-muted); margin-top: 2px; }

/* Durum hapı — başlıkta ve ekipman kartlarında aynı bileşen */
.xc-pill {
  display: inline-flex; align-items: center; gap: var(--xc-2);
  padding: 4px var(--xc-3); border-radius: var(--xc-r-pill);
  font: var(--xc-t-tag); text-transform: none; letter-spacing: 0;
  background: var(--xc-idle-soft); color: var(--xc-idle-text); white-space: nowrap;
}
.xc-pill.is-ok    { background: var(--xc-ok-soft);    color: var(--xc-ok-text); }
.xc-pill.is-fault { background: var(--xc-fault-soft); color: var(--xc-fault-text); }
.xc-pill.is-warn  { background: var(--xc-warn-soft);  color: var(--xc-warn-text); }
.xc-pill.is-info  { background: var(--xc-info-soft);  color: var(--xc-info-text); }

/* ---- İşlemler menüsü -------------------------------------------------------- */

.xc-menu { position: relative; }
.xc-menu > summary { list-style: none; cursor: pointer; }
.xc-menu > summary::-webkit-details-marker { display: none; }
.xc-menu > summary::after { content: '⌄'; margin-left: var(--xc-2); }

.xc-menu__body {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px;
  background: var(--xc-surface); border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md); box-shadow: var(--xc-shadow-float);
  padding: var(--xc-1); display: grid;
}
.xc-menu__item {
  display: block; width: 100%; text-align: left;
  padding: var(--xc-3); border: 0; border-radius: var(--xc-r-sm);
  background: none; color: var(--xc-text); font: var(--xc-t-small);
  text-decoration: none; cursor: pointer;
}
.xc-menu__item:hover { background: var(--xc-surface-sunken); }
.xc-menu__item.is-disabled { color: var(--xc-text-faint); pointer-events: none; }
.xc-menu__form { margin: 0; }
.xc-menu__item--danger { color: var(--xc-fault-text); }
.xc-menu__item--danger:hover { background: var(--xc-fault-soft); color: var(--xc-fault-text); }

/* ---- Üst sıra: görsel + durum + harita ---------------------------------------- */

.xc-hero-row {
  display: grid; gap: var(--xc-4);
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.35fr) minmax(240px, .9fr);
  margin-bottom: var(--xc-4);
}

.xc-hero { display: grid; place-items: center; padding: var(--xc-5); background: var(--xc-surface-sunken); }
.xc-hero__art { width: 100%; height: auto; max-width: 340px; }
.xc-hero__img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--xc-r-md); }

.xc-status { display: grid; align-content: space-between; padding: var(--xc-5); gap: var(--xc-5); }
.xc-status__top { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: var(--xc-4); align-items: start; }
.xc-status__dot { width: 44px; height: 44px; border-radius: 50%; background: var(--xc-idle-mark); }
.xc-status__dot.is-ok    { background: var(--xc-ok-mark); }
.xc-status__dot.is-fault { background: var(--xc-fault-mark); }
.xc-status__dot.is-warn  { background: var(--xc-warn-mark); }
.xc-status__dot.is-info  { background: var(--xc-info-mark); }
.xc-status__bottom {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--xc-4);
  padding-top: var(--xc-5); border-top: 1px solid var(--xc-line);
}

.xc-metric__label { font: var(--xc-t-small); color: var(--xc-text-muted); }
.xc-metric__value { font: var(--xc-t-h2); letter-spacing: -.01em; margin-top: 2px; }
.xc-metric__value small { font: var(--xc-t-small); color: var(--xc-text-muted); margin-left: 3px; }
.xc-metric__value .is-nodata { color: var(--xc-text-faint); font: var(--xc-t-body); }
.xc-metric__value.is-ok    { color: var(--xc-ok-text); }
.xc-metric__value.is-fault { color: var(--xc-fault-text); }
.xc-metric__value.is-warn  { color: var(--xc-warn-text); }
.xc-metric__sub { font: var(--xc-t-meta); color: var(--xc-text-faint); margin-top: 2px; }

/* Harita: sağlayıcı yapılandırılmadı, yer tutucu desen + Maps bağlantısı */
.xc-map { display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
/* Harita kabı. Desen YALNIZCA gerçekten harita olmayan durumda gösterilir;
   boş bir kutuyu süslemek "çalışıyor ama boş" izlenimi veriyordu. */
.xc-map__canvas { min-height: 180px; background: var(--xc-surface-sunken); }

.xc-map__canvas--empty {
  display: grid; place-items: center; padding: var(--xc-5);
  text-align: center; font: var(--xc-t-small); color: var(--xc-text-muted);
  background:
    repeating-linear-gradient(45deg, var(--xc-info-soft) 0 14px, transparent 14px 28px),
    repeating-linear-gradient(-45deg, var(--xc-info-soft) 0 14px, transparent 14px 28px),
    var(--xc-surface);
}
.xc-map__foot {
  display: flex; justify-content: space-between; align-items: center; gap: var(--xc-3);
  padding: var(--xc-4) var(--xc-5); border-top: 1px solid var(--xc-line); font: var(--xc-t-small);
}
.xc-map__foot a { color: var(--xc-navy-bright); text-decoration: none; }

/* ---- Ölçüm şeridi -------------------------------------------------------------- */

.xc-sensors {
  display: grid; gap: var(--xc-3);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: var(--xc-5);
}
.xc-sensor {
  display: flex; align-items: center; gap: var(--xc-3);
  padding: var(--xc-4);
  background: var(--xc-surface); border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
}
.xc-sensor.is-empty { background: var(--xc-surface-sunken); }
.xc-sensor__dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--xc-info-soft);
  box-shadow: inset 0 0 0 6px var(--xc-surface), inset 0 0 0 9px var(--xc-info-mark);
}
.xc-sensor__dot.is-nodata, .xc-sensor.is-empty .xc-sensor__dot {
  box-shadow: inset 0 0 0 6px var(--xc-surface), inset 0 0 0 9px var(--xc-idle-mark);
}
.xc-sensor__dot.is-warn  { box-shadow: inset 0 0 0 6px var(--xc-surface), inset 0 0 0 9px var(--xc-warn-mark); }
.xc-sensor__dot.is-fault { box-shadow: inset 0 0 0 6px var(--xc-surface), inset 0 0 0 9px var(--xc-fault-mark); }
.xc-sensor__label { font: var(--xc-t-small); color: var(--xc-text-muted); }
.xc-sensor__value { font: var(--xc-t-h2); letter-spacing: -.01em; }
.xc-sensor__value small { font: var(--xc-t-small); color: var(--xc-text-muted); margin-left: 3px; }
.xc-sensor__value .is-nodata { color: var(--xc-text-faint); font: var(--xc-t-body); }

/* ---- Proses özeti ---------------------------------------------------------------- */

.xc-process { padding: var(--xc-6); }
.xc-process__head {
  display: flex; align-items: baseline; gap: var(--xc-4); flex-wrap: wrap;
  margin-bottom: var(--xc-2);
}
.xc-process__eyebrow {
  width: 100%; font: var(--xc-t-tag); letter-spacing: var(--xc-tag-track);
  color: var(--xc-text-faint);
}
.xc-process__title { font: var(--xc-t-h1); letter-spacing: -.01em; }
.xc-process__head .xc-faint { margin-left: auto; }
.xc-process .xc-group-head { margin-top: var(--xc-6); }

/* ---- Ekipman ızgarası ------------------------------------------------------------- */

.xc-eq-grid {
  display: grid; gap: var(--xc-3);
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.xc-eq {
  display: grid; grid-template-columns: 44px 1fr auto;
  align-items: center; gap: var(--xc-3);
  padding: var(--xc-3) var(--xc-4);
  background: var(--xc-surface); border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
}
.xc-eq.is-fault { border-color: var(--xc-fault-mark); }
.xc-eq.is-warn  { border-color: var(--xc-warn-mark); }

.xc-eq__icon {
  width: 44px; height: 44px; border-radius: var(--xc-r-md);
  display: grid; place-items: center;
  background: var(--xc-surface-sunken); color: var(--xc-navy); font-size: 16px;
}
.xc-eq.is-ok    .xc-eq__icon { background: var(--xc-ok-soft);    color: var(--xc-ok-text); }
.xc-eq.is-fault .xc-eq__icon { background: var(--xc-fault-soft); color: var(--xc-fault-text); }
.xc-eq.is-warn  .xc-eq__icon { background: var(--xc-warn-soft);  color: var(--xc-warn-text); }

.xc-eq__name { font: var(--xc-t-body-md); }
.xc-eq__code { font: var(--xc-t-meta); color: var(--xc-text-faint); letter-spacing: .02em; }
.xc-eq__badges { display: flex; gap: var(--xc-1); flex-wrap: wrap; margin-top: var(--xc-1); }

.xc-two-col { display: grid; gap: var(--xc-4); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---- Dar ekran ----------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .xc-hero-row { grid-template-columns: 1fr 1fr; }
  .xc-hero { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .xc-hero-row { grid-template-columns: 1fr; }
  .xc-hero { grid-column: auto; }
  .xc-plant-head { grid-template-columns: 56px 1fr; }
  .xc-plant-head__thumb { width: 56px; height: 44px; }
  .xc-plant-head__actions { grid-column: 1 / -1; }
  .xc-plant-head__title h1 { font: var(--xc-t-h1); }
  .xc-status__top { grid-template-columns: auto 1fr; gap: var(--xc-3); }
  .xc-status__bottom { grid-template-columns: 1fr 1fr; }
  .xc-process { padding: var(--xc-4); }
}

.xc-sensor__note { font: var(--xc-t-meta); color: var(--xc-text-faint); margin-top: 2px; }

/* ---- Harita --------------------------------------------------------------- */

#xcMap { min-height: 210px; height: 100%; z-index: 0; }
#xcMap .leaflet-control-attribution { font-size: 10px; }

.xc-map__foot { align-items: flex-start; }

/* Konum ayrıntı listesi ---------------------------------------------------- */
.xc-loc {
  display: grid; grid-template-columns: auto 1fr; gap: 2px var(--xc-3);
  margin: var(--xc-2) 0 0; font: var(--xc-t-meta);
}
.xc-loc dt { color: var(--xc-text-faint); }
.xc-loc dd { margin: 0; color: var(--xc-text-muted); }

.xc-map__links { display: grid; gap: 4px; text-align: right; white-space: nowrap; }
.xc-map__links a { color: var(--xc-navy-bright); text-decoration: none; font: var(--xc-t-meta); }
.xc-map__links a:hover { text-decoration: underline; }

/* ---- Arıza özeti ----------------------------------------------------------- */

.xc-fault {
  display: grid; grid-template-columns: 1fr auto; gap: var(--xc-3);
  width: 100%; text-align: left; cursor: pointer;
  padding: var(--xc-4) var(--xc-5);
  background: none; border: 0; border-bottom: 1px solid var(--xc-line);
  border-left: 3px solid transparent;
  font: inherit; color: inherit;
}
.xc-fault:last-child { border-bottom: 0; }
.xc-fault:hover { background: var(--xc-surface-sunken); }
.xc-fault.is-fault { border-left-color: var(--xc-fault-mark); }
.xc-fault.is-warn  { border-left-color: var(--xc-warn-mark); }
.xc-fault.is-ok    { border-left-color: var(--xc-ok-mark); }

.xc-fault__name { font: var(--xc-t-body-md); }
.xc-fault__code { font: var(--xc-t-meta); color: var(--xc-text-faint); letter-spacing: .02em; }
.xc-fault__time { font: var(--xc-t-meta); color: var(--xc-text-muted); margin-top: 4px; }
.xc-fault__state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

@media (max-width: 600px) {
  .xc-fault { grid-template-columns: 1fr; }
  .xc-fault__state { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---- Marka (gerçek logo) ---------------------------------------------------- */

.xc-sidebar__brand { text-decoration: none; }

.xc-brand__mark { width: 20px; height: 20px; flex: none; display: block; }

.xc-brand__text { display: grid; gap: 1px; }

/* Gömülü SVG olduğu için fill="currentColor" çalışıyor. */
.xc-brand__wordmark {
  display: block; height: 13px; width: auto;
  color: var(--xc-navy);
}
:root[data-theme="dark"] .xc-brand__wordmark { color: var(--xc-text); }

.xc-brand__product {
  font: var(--xc-t-meta); font-weight: 700;
  letter-spacing: .22em; color: var(--xc-text-muted);
}

.xc-login__brand { display: flex; align-items: center; gap: var(--xc-3); }
.xc-login__brand .xc-brand__mark { width: 26px; height: 26px; }
.xc-login__brand .xc-brand__wordmark { height: 18px; }

.xc-plant-head__thumb img { width: 100%; height: 100%; object-fit: cover; }
.xc-hero { padding: 0; overflow: hidden; }
.xc-hero__img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; }

/* ---- Filo haritası ---------------------------------------------------------- */


.xc-maplayout {
  display: grid;
  gap: var(--xc-4);
  grid-template-columns: 1fr;
  align-items: start;
}

.xc-mapstage {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 72vh;
  background: linear-gradient(180deg, #031636 0%, #06245a 34%, #04193f 100%);
}

.xc-mapstage::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 14%, rgba(124, 198, 255, .16) 0%, rgba(124,198,255,0) 22%),
    radial-gradient(circle at 88% 14%, rgba(124, 198, 255, .12) 0%, rgba(124,198,255,0) 24%),
    radial-gradient(circle at 10% 88%, rgba(124, 198, 255, .12) 0%, rgba(124,198,255,0) 24%),
    radial-gradient(circle at 90% 88%, rgba(124, 198, 255, .16) 0%, rgba(124,198,255,0) 22%),
    linear-gradient(180deg, rgba(2,13,30,.05), rgba(2,13,30,.22));
}

.xc-maplayout__map { padding: 0; overflow: hidden; background: transparent; }
.xc-maplayout__map #fleetMap {
  position: relative;
  z-index: 0;
  height: 72vh;
  min-height: 560px;
}

#fleetMap.xc-map__canvas--globe {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 14%, rgba(73,144,255,.18) 0%, rgba(7,28,59,.1) 30%, rgba(2,8,22,0) 60%),
    radial-gradient(circle at 50% 105%, rgba(70,146,255,.18) 0%, rgba(70,146,255,.04) 18%, rgba(2,8,22,0) 48%),
    linear-gradient(180deg, #041a4a 0%, #072f77 38%, #072a69 58%, #04193f 100%);
}

#fleetMap.xc-map__canvas--globe::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image:
    radial-gradient(2px 2px at 10% 18%, rgba(255,255,255,.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 62%, rgba(137,190,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 37% 24%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(2px 2px at 58% 14%, rgba(137,190,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 74% 31%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 70%, rgba(137,190,255,.4), transparent 60%),
    radial-gradient(2px 2px at 67% 56%, rgba(255,255,255,.5), transparent 60%);
}

.xc-mapoverlay {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 12;
  width: min(420px, calc(100% - 48px));
  max-height: calc(100% - 48px);
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 28px;
  border: 1px solid rgba(139, 188, 255, .22);
  background:
    linear-gradient(180deg, rgba(34,76,149,.60) 0%, rgba(29,70,140,.54) 100%);
  color: #eef6ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 18px 48px rgba(4,12,28,.36),
    0 0 32px rgba(76,147,255,.12);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  overflow: hidden;
}

.xc-mapoverlay::before,
.xc-mapoverlay::after {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
}

.xc-mapoverlay::before {
  background:
    radial-gradient(circle at 0 0, rgba(153, 213, 255, .35) 0, rgba(153,213,255,0) 18%),
    radial-gradient(circle at 100% 0, rgba(153, 213, 255, .28) 0, rgba(153,213,255,0) 18%),
    radial-gradient(circle at 0 100%, rgba(153, 213, 255, .18) 0, rgba(153,213,255,0) 18%),
    radial-gradient(circle at 100% 100%, rgba(153, 213, 255, .24) 0, rgba(153,213,255,0) 18%);
  opacity: .88;
}

.xc-mapoverlay::after {
  inset: auto 0 0 0;
  height: 42%;
  background: radial-gradient(circle at 50% 100%, rgba(206,225,255,.16) 0%, rgba(206,225,255,.06) 32%, rgba(206,225,255,0) 66%);
}

.xc-mapoverlay.is-hidden { display: none; }
.xc-mapoverlay.is-min .xc-mapoverlay__body { display: none; }
.xc-mapoverlay.is-dragging { cursor: grabbing; user-select: none; }

.xc-mapoverlay__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 16px 18px;
  cursor: grab;
  border-bottom: 1px solid rgba(189, 215, 255, .12);
}

.xc-mapoverlay__titlebox {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.xc-mapoverlay__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #edf6ff;
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-size: 18px;
}

.xc-mapoverlay__eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(218,235,255,.72);
}

.xc-mapoverlay__title {
  font-size: 18px;
  font-weight: 600;
  color: #f6fbff;
}

.xc-mapoverlay__meta {
  font-size: 13px;
  color: rgba(226,240,255,.72);
}

.xc-mapoverlay__actions { display: inline-flex; gap: 8px; }
.xc-mapoverlay__btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(192,214,255,.14);
  background: rgba(255,255,255,.08);
  color: #eef6ff;
  font: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.xc-mapoverlay__btn:hover { background: rgba(255,255,255,.14); }

.xc-mapoverlay__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
  min-height: 0;
}

.xc-mapoverlay__filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
}

.xc-mapoverlay .xc-chip {
  border-radius: 999px;
  border-color: rgba(219,232,255,.18);
  background: rgba(255,255,255,.05);
  color: rgba(246,251,255,.92);
  backdrop-filter: blur(8px);
}
.xc-mapoverlay .xc-chip[aria-pressed="true"] {
  background: rgba(154, 207, 255, .18);
  border-color: rgba(154, 207, 255, .26);
  color: #fff;
}

.xc-mapoverlay__list {
  min-height: 0;
  max-height: 420px;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(205,225,255,.10);
  background: rgba(20,53,114,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.xc-mapoverlay__foot {
  padding-top: 2px;
}

.xc-mapoverlay .xc-faint,
.xc-mapoverlay #mapNote {
  color: rgba(223,237,255,.70);
  margin: 0;
}

.xc-mapoverlay .xc-maprow {
  grid-template-columns: 10px 1fr auto;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(219,232,255,.10);
  color: #eef6ff;
}
.xc-mapoverlay .xc-maprow:hover { background: rgba(255,255,255,.06); }
.xc-mapoverlay .xc-maprow__name { color: #f7fbff; font-weight: 600; }
.xc-mapoverlay .xc-maprow__meta { color: rgba(223,237,255,.72); }
.xc-mapoverlay .xc-pill {
  border-color: rgba(215,230,255,.12);
  background: rgba(255,255,255,.08);
  color: #edf6ff;
}

.xc-mapoverlay-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 11;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(139, 188, 255, .22);
  background: rgba(29,70,140,.55);
  color: #eef6ff;
  box-shadow: 0 18px 48px rgba(4,12,28,.34);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  cursor: pointer;
}

.xc-mapoverlay-toggle[hidden] { display: none !important; }

.xc-globe-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 10px 5px 7px;
  border: 1px solid rgba(110, 164, 255, .28);
  border-radius: 18px;
  color: #e4f4ff;
  background: rgba(3, 14, 31, .62);
  box-shadow: 0 0 0 1px rgba(105, 168, 255, .06), 0 0 18px rgba(68, 138, 255, .14);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.xc-globe-label__pin {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6ed8ff;
  box-shadow: 0 0 0 2px rgba(110,216,255,.18), 0 0 14px rgba(110,216,255,.85);
}

.xc-globe-label__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.xc-globe-label__code {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.xc-globe-label__name {
  font-size: 10px;
  line-height: 1.1;
  color: rgba(228,244,255,.94);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xc-globe-label__city {
  font-size: 9px;
  line-height: 1.1;
  color: rgba(196,225,255,.72);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xc-globe-label.is-active {
  border-color: rgba(89, 190, 255, .42);
  box-shadow: 0 0 16px rgba(66, 178, 255, .26);
  animation: xcLabelPulseBlue 1.8s ease-in-out infinite;
}
.xc-globe-label.is-active .xc-globe-label__pin {
  background: #52d2ff;
  box-shadow: 0 0 0 2px rgba(82,210,255,.18), 0 0 16px rgba(82,210,255,.86);
}

.xc-globe-label.is-fault {
  border-color: rgba(255, 93, 116, .5);
  box-shadow: 0 0 18px rgba(255, 82, 99, .28);
  animation: xcLabelPulseRed .9s ease-in-out infinite;
}
.xc-globe-label.is-fault .xc-globe-label__pin {
  background: #ff6278;
  box-shadow: 0 0 0 2px rgba(255,98,120,.22), 0 0 16px rgba(255,98,120,.92);
}

.xc-globe-label.is-offline {
  border-color: rgba(154, 166, 180, .3);
  color: #d7dce2;
  box-shadow: 0 0 12px rgba(154, 166, 180, .12);
  animation: xcLabelPulseGray 2.8s ease-in-out infinite;
}
.xc-globe-label.is-offline .xc-globe-label__pin {
  background: #aeb7c2;
  box-shadow: 0 0 0 2px rgba(174,183,194,.14), 0 0 12px rgba(174,183,194,.42);
}

.xc-globe-label.is-hub {
  border-color: rgba(118, 214, 255, .52);
  background: rgba(3, 17, 35, .82);
  box-shadow: 0 0 20px rgba(85, 198, 255, .24);
}
.xc-globe-label.is-hub .xc-globe-label__pin {
  background: #7ce2ff;
  box-shadow: 0 0 0 2px rgba(124,226,255,.18), 0 0 18px rgba(124,226,255,.96);
}

.xc-globe-fullscreen {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 14;
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(116, 184, 255, .35);
  border-radius: 16px;
  background: rgba(4, 15, 30, .74);
  color: #e4f4ff;
  box-shadow: 0 8px 28px rgba(2,8,22,.35), 0 0 18px rgba(67, 144, 255, .18);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.xc-globe-fullscreen:hover { background: rgba(8, 30, 61, .88); }

@keyframes xcLabelPulseBlue {
  0%, 100% { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
}

@keyframes xcLabelPulseRed {
  0%, 100% { opacity: .76; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes xcLabelPulseGray {
  0%, 100% { opacity: .58; }
  50% { opacity: .84; }
}

.xc-maprow {
  display: grid; grid-template-columns: 10px 1fr auto;
  align-items: center; gap: var(--xc-3);
  width: 100%; text-align: left; cursor: pointer;
  padding: var(--xc-3) var(--xc-4);
  background: none; border: 0; border-bottom: 1px solid var(--xc-line);
  font: inherit; color: inherit;
}
.xc-maprow:last-child { border-bottom: 0; }
.xc-maprow:hover { background: var(--xc-surface-sunken); }
.xc-maprow.is-nocoord { opacity: .55; }
.xc-maprow__text { display: grid; gap: 1px; min-width: 0; }
.xc-maprow__name { font: var(--xc-t-body-md); }
.xc-maprow__meta {
  font: var(--xc-t-meta); color: var(--xc-text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 1000px) {
  .xc-maplayout__map #fleetMap { height: 56vh; min-height: 360px; }
  .xc-mapstage { min-height: 72vh; }
  .xc-mapoverlay__list { max-height: 280px; }
  .xc-mapoverlay-toggle { top: 14px; right: 14px; }
}

/* ---- Kullanıcı yönetimi ------------------------------------------------------ */

.xc-users { display: grid; gap: var(--xc-4); grid-template-columns: 1.5fr 1fr; align-items: start; }

.xc-userrow {
  display: grid; grid-template-columns: 1fr auto; gap: var(--xc-3);
  padding: var(--xc-4) var(--xc-5);
  border-bottom: 1px solid var(--xc-line);
}
.xc-userrow:last-child { border-bottom: 0; }
.xc-userrow.is-inactive { opacity: .55; }
.xc-userrow__name { font: var(--xc-t-body-md); }
.xc-userrow__meta { font: var(--xc-t-meta); color: var(--xc-text-faint); }
.xc-userrow__meta .is-warning { color: var(--xc-warn-text); }
.xc-userrow__state { display: flex; align-items: center; gap: var(--xc-2); flex-wrap: wrap; justify-content: flex-end; }

.xc-roles { display: flex; gap: var(--xc-3); flex-wrap: wrap; }
.xc-radio { display: flex; align-items: center; gap: var(--xc-2); font: var(--xc-t-small); cursor: pointer; }
.xc-radio input { width: 16px; height: 16px; accent-color: var(--xc-navy); }

.xc-plantpick {
  display: grid; gap: var(--xc-2);
  max-height: 180px; overflow: auto;
  padding: var(--xc-3);
  border: 1px solid var(--xc-line-strong); border-radius: var(--xc-r-md);
  background: var(--xc-surface);
}

.xc-userform code {
  font-family: ui-monospace, monospace; font-size: 14px;
  padding: 2px 6px; border-radius: 4px; background: var(--xc-surface);
}

@media (max-width: 1000px) {
  .xc-users { grid-template-columns: 1fr; }
  .xc-userrow { grid-template-columns: 1fr; }
  .xc-userrow__state { justify-content: flex-start; }
}

/* ---- Harita tam ekran ------------------------------------------------------- */

.xc-map--fs {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  border-radius: 0;
}

/* Tarayıcının kendi tam ekran modunda arka plan siyah kalmasın */
#fleetMap:fullscreen, #xcMap:fullscreen { background: #04193f; }

.xc-fsbtn a {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  font-size: 15px; line-height: 1;
  color: var(--xc-navy); background: #fff;
  text-decoration: none;
}
:root[data-theme="dark"] .xc-fsbtn a { background: var(--xc-surface); color: var(--xc-text); }

/* =============================================================================
   Xealio Connect — Canli Proses Ekrani
   plant.php > Genel / Ekran / Ekipman. Inline SVG ikonlar ve tum durumlar
   plant-live API'sinden gelir; bu katmanda sahte proses degeri uretilmez.
   ============================================================================= */

.xc-main--plant > [data-panel="screen"] { max-width: 1600px; }

.xc-screen-shell {
  min-width: 0;
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-lg);
  background: var(--xc-surface-sunken);
  overflow: hidden;
  box-shadow: var(--xc-shadow-raised);
}

.xc-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--xc-5);
  padding: var(--xc-4) var(--xc-5);
  border-bottom: 1px solid var(--xc-line);
  background: var(--xc-surface);
}
.xc-screen-header h2 { margin: 2px 0 0; font: var(--xc-t-h1); letter-spacing: -.015em; }
.xc-screen-header__eyebrow {
  font: var(--xc-t-tag);
  letter-spacing: var(--xc-tag-track);
  color: var(--xc-navy-bright);
}
.xc-screen-header__meta { margin-top: 2px; font: var(--xc-t-meta); color: var(--xc-text-faint); }

.xc-screen-legend { display: flex; align-items: center; gap: var(--xc-3); flex-wrap: wrap; justify-content: flex-end; }
.xc-screen-legend > span {
  display: inline-flex; align-items: center; gap: 6px;
  font: var(--xc-t-meta); color: var(--xc-text-muted);
  white-space: nowrap;
}
.xc-screen-legend i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--xc-idle-mark);
}
.xc-screen-legend .is-ok i { background: var(--xc-ok-mark); }
.xc-screen-legend .is-fault i { background: var(--xc-fault-mark); }
.xc-screen-legend .is-info i { background: var(--xc-info-mark); }

.xc-screen-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: var(--xc-3);
  padding: var(--xc-3);
  align-items: start;
}
.xc-screen-main, .xc-screen-side { display: grid; gap: var(--xc-3); min-width: 0; }
.xc-screen-side { position: sticky; top: var(--xc-3); }

.xc-screen-box,
.xc-screen-flow {
  min-width: 0;
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
  background: var(--xc-surface);
  overflow: hidden;
}
.xc-screen-box__title,
.xc-screen-flow__title {
  padding: 9px var(--xc-3);
  border-bottom: 1px solid var(--xc-line);
  color: var(--xc-navy-bright);
  font: var(--xc-t-tag);
  letter-spacing: .045em;
  text-align: center;
}
.xc-screen-box__body { padding: var(--xc-2); }

.xc-screen-topgrid {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(410px, 1.7fr) minmax(480px, 2fr);
  gap: var(--xc-3);
}
.xc-screen-bottomgrid {
  display: grid;
  grid-template-columns: minmax(460px, 1.5fr) minmax(180px, .65fr) minmax(410px, 1.35fr);
  gap: var(--xc-3);
}

.xc-screen-box__equipment {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: var(--xc-2);
}
.xc-screen-box.is-raw .xc-screen-box__equipment,
.xc-screen-box.is-disinfection .xc-screen-box__equipment { grid-template-columns: 1fr; }
.xc-screen-empty { padding: var(--xc-4); text-align: center; font: var(--xc-t-small); color: var(--xc-text-faint); }

.xc-screen-eq {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: var(--xc-2);
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-sm);
  background: var(--xc-surface);
  overflow: hidden;
}
.xc-screen-eq::before {
  content: '';
  position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--xc-idle-mark);
}
.xc-screen-eq.is-ok::before { background: var(--xc-ok-mark); }
.xc-screen-eq.is-fault::before { background: var(--xc-fault-mark); }
.xc-screen-eq.is-warn::before { background: var(--xc-warn-mark); }
.xc-screen-eq.is-info::before { background: var(--xc-info-mark); }
.xc-screen-eq.is-idle::before { background: var(--xc-idle-mark); }
.xc-screen-eq__line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xc-screen-eq__code { font: var(--xc-t-small); font-weight: 700; color: var(--xc-text); white-space: nowrap; }
.xc-screen-eq__details { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.xc-screen-eq__name { font: var(--xc-t-meta); color: var(--xc-text-muted); line-height: 1.25; }
.xc-screen-eq__sub { font: var(--xc-t-meta); color: var(--xc-text-faint); }
.xc-screen-eq__role { font-size: 10px; font-weight: 600; color: var(--xc-text-faint); }
.xc-screen-eq__verify { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--xc-warn-soft); color: var(--xc-warn-text); font-size: 10px; }
.xc-screen-eq__state { display: inline-flex; align-items: center; width: max-content; max-width: 100%; padding: 3px 7px; border-radius: var(--xc-r-pill); background: var(--xc-idle-soft); color: var(--xc-idle-text); font: var(--xc-t-tag); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xc-screen-eq__state.is-ok { background: var(--xc-ok-soft); color: var(--xc-ok-text); }
.xc-screen-eq__state.is-fault { background: var(--xc-fault-soft); color: var(--xc-fault-text); }
.xc-screen-eq__state.is-warn { background: var(--xc-warn-soft); color: var(--xc-warn-text); }
.xc-screen-eq__state.is-info { background: var(--xc-info-soft); color: var(--xc-info-text); }
.xc-screen-eq__state.is-idle { background: var(--xc-idle-soft); color: var(--xc-idle-text); }

.xc-screen-icon, .xc-screen-sensor-icon { width: 32px; height: 32px; display: block; fill: currentColor; }
.xc-screen-icon__cut { fill: var(--xc-surface); }
.xc-screen-icon__liquid { fill: var(--xc-info-mark); }
.xc-screen-icon__line { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.xc-screen-icon__text { fill: var(--xc-surface); font: 700 17px/1 var(--xc-font); }

/* Proses tanklari: masaustunda HMI gibi yatay, kucuk ekranda kaydirilabilir. */
.xc-screen-flow { overflow: visible; }
.xc-screen-modelwrap { padding: 8px; }
/* =============================================================================
   İzometrik model
   Renklerin tamamı tokens.css'ten gelir. Önceki sürümde bu blok kendi
   paletini kurmuştu (#3b82f6, #ef4444, #9ca3af, #f8fafc); sonuç olarak
   "çalışıyor" durumu panelin geri kalanında yeşilken burada maviydi ve
   koyu tema için hiçbir karşılığı yoktu.
   ============================================================================= */

.xc-model { display: grid; gap: var(--xc-3); }

.xc-model__head {
  display: flex; align-items: center; gap: var(--xc-3); flex-wrap: wrap;
}
.xc-model__title { font: var(--xc-t-body-md); }
.xc-model__head .xc-model-legend { margin-left: auto; }

.xc-model-legend { display: flex; gap: var(--xc-4); flex-wrap: wrap; }
.xc-model-legend span {
  display: inline-flex; align-items: center; gap: 6px;
  font: var(--xc-t-meta); color: var(--xc-text-muted);
}
.xc-model-legend i { width: 9px; height: 9px; border-radius: 50%; }

/* ---- Görünüş şeridi (kaydırmalı) ------------------------------------------- */

.xc-model-tabs { display: flex; gap: var(--xc-2); flex-wrap: wrap; }

.xc-model-tab {
  padding: 6px var(--xc-4);
  border: 1px solid var(--xc-line-strong); border-radius: var(--xc-r-pill);
  background: transparent; color: var(--xc-text);
  font: var(--xc-t-small); cursor: pointer;
}
.xc-model-tab[aria-current="true"] {
  background: var(--xc-info-soft); border-color: transparent;
  color: var(--xc-info-text); font-weight: 600;
}

.xc-model-viewport { position: relative; }

/*
 * Kaydırma CSS scroll-snap ile. Dokunmatik ekranda parmakla, masaüstünde
 * oklarla ya da üstteki sekmelerle geçiliyor. Ek kütüphane yok.
 */
.xc-model-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--xc-r-md);
}
.xc-model-track::-webkit-scrollbar { display: none; }
.xc-model-slide { scroll-snap-align: center; min-width: 0; }

.xc-model-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--xc-line-strong);
  background: var(--xc-surface); color: var(--xc-text);
  font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: var(--xc-shadow-raised);
}
.xc-model-nav--prev { left: var(--xc-3); }
.xc-model-nav--next { right: var(--xc-3); }
.xc-model-nav[disabled] { opacity: 0; pointer-events: none; }

@media (hover: none) {
  /* Dokunmatik ekranda parmakla kaydırılıyor; oklar yer kaplamasın. */
  .xc-model-nav { display: none; }
}

/*
 * Blueprint yüzeyi.
 *
 * Çizimler siyah konturlu PNG. invert(1) ile beyaz kontura çevrilip
 * mix-blend-mode: screen ile mavi zemine bindiriliyor; screen siyahı
 * geçirgen bıraktığı için altta kalan mavi görünüyor, beyaz çizgi beyaz
 * kalıyor. Tek bir görselle hem açık hem koyu temada çalışıyor.
 */
.xc-model-stage {
  position: relative;
  width: 100%;
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
  background:
    linear-gradient(var(--xc-blueprint-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--xc-blueprint-grid) 1px, transparent 1px),
    var(--xc-blueprint);
  background-size: 64px 64px, 64px 64px, auto;
  overflow: hidden;

  /* Karisim modunun sayfa zeminine tasmamasi icin kendi katmanini kurar.
     Bu olmadan gorsel, altindaki panel arka planiyla karisabiliyor. */
  isolation: isolate;

  /*
   * Durum renkleri mavi zemin için parlak varyantlara çevriliyor.
   * Token'ları burada yeniden tanımlamak yeterli: nokta, hale, kesik halka,
   * hepsi zaten bu değişkenleri okuyor, tek bir kural bile değişmiyor.
   * Normal kırmızı (#D54545) mavi üzerinde 2.97:1 ile zayıf kalıyordu;
   * parlak kırmızı 5.19:1.
   */
  --xc-ok-mark:    var(--xc-ok-bright);
  --xc-fault-mark: var(--xc-fault-bright);
  --xc-warn-mark:  var(--xc-warn-bright);
  --xc-info-mark:  var(--xc-info-bright);
  --xc-idle-mark:  var(--xc-idle-bright);

  /* Noktanın dış halkası zeminle aynı olmalı ki disk ayrı dursun. */
  --xc-surface: var(--xc-blueprint);

  /*
   * Noktanın üstündeki tek harf (P/B/M/V/D).
   * Beyaz harf bu parlak zeminlerde 1.7–2.2:1 ile okunmuyordu; lacivert
   * harf 5.9–7.7:1. Blueprint yüzeyinde harf her zaman koyu.
   */
  --xc-on-mark: var(--xc-blueprint);

  /* Kod etiketi: mavi üzerinde lacivert okunmuyordu, beyaza çevrildi. */
  --xc-navy: var(--xc-on-blueprint);
  --xc-text-on-navy: var(--xc-blueprint);
}

.xc-model-stage__image {
  display: block; width: 100%; height: auto;
  filter: invert(1);
  mix-blend-mode: screen;
}
/* Koyu temada ek bir çevirme YOK; blueprint zaten koyu. */
:root[data-theme="dark"] .xc-model-stage__image { filter: invert(1); }

.xc-model-stage__overlay { position: absolute; inset: 0; }

.xc-model-point {
  position: absolute;
  width: 56px; height: 56px;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;

  /*
   * Durum rengi tek değişkenden: alt parçalar --xc-point-tone okuyor.
   * Böylece her durum için ayrı nokta/hale/halka kuralı yazmak gerekmiyor.
   *
   * Burada currentColor KULLANILMAZ. Kullanıldığında nokta üzerindeki harfin
   * rengi (color: var(--xc-on-mark)) aynı elemanın background: currentColor
   * değerini de ele geçiriyordu: dairenin içi durum rengi yerine lacivert
   * doluyordu. currentColor elemanın KENDİ color değerini okur, ebeveynin
   * değil.
   */
  --xc-point-tone: var(--xc-idle-mark);
}
.xc-model-point.is-ok    { --xc-point-tone: var(--xc-ok-mark); }
.xc-model-point.is-info  { --xc-point-tone: var(--xc-info-mark); }
.xc-model-point.is-warn  { --xc-point-tone: var(--xc-warn-mark); }
.xc-model-point.is-fault { --xc-point-tone: var(--xc-fault-mark); z-index: 3; }

/* Dolu disk: işaretin çizimden ayrılmasını sağlar. Önceki sürümde yalnızca
   ince bir halka vardı ve yoğun boru işinin üstünde kayboluyordu. */
.xc-model-point::before {
  content: '';
  position: absolute; inset: 50% auto auto 50%;
  width: 46px; height: 46px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--xc-point-tone); opacity: .22;
  pointer-events: none;
}

.xc-model-point:focus-visible { outline: none; }
.xc-model-point:focus-visible .xc-model-point__dot {
  box-shadow: 0 0 0 3px var(--xc-on-blueprint);
}

.xc-model-point__halo,
.xc-model-point__dot {
  position: absolute; inset: 50% auto auto 50%;
  transform: translate(-50%, -50%); border-radius: 50%;
}

.xc-model-point__halo {
  width: 46px; height: 46px;
  background: transparent;
  border: 2px solid var(--xc-point-tone);
  opacity: .9;
}

.xc-model-point__dot {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font: 700 12px/1 var(--xc-font);
  color: var(--xc-on-mark);              /* harf */
  border: 3px solid var(--xc-blueprint);
  background: var(--xc-point-tone);      /* dolgu — currentColor DEĞİL */
  box-shadow: var(--xc-mark-shadow);
}

/* Kod etiketi: yalnızca üstüne gelince ya da odakta. Kalabalık bir çizimde
   yirmi etiketi birden göstermek okunmaz hale getiriyor. */
.xc-model-point__tag {
  position: absolute; left: 50%; top: calc(50% + 22px);
  transform: translateX(-50%);
  padding: 2px 6px; border-radius: var(--xc-r-sm);
  font: var(--xc-t-meta); letter-spacing: .02em; white-space: nowrap;
  background: var(--xc-navy); color: var(--xc-text-on-navy);
  opacity: 0; pointer-events: none;
  transition: opacity var(--xc-fast) var(--xc-ease);
  z-index: 2;
}
.xc-model-point:hover .xc-model-point__tag,
.xc-model-point:focus-visible .xc-model-point__tag { opacity: 1; }

/* ---- Dalga: her durumun kendi ritmi -----------------------------------------
 * Üçü de dalgalanır, ama aynı şiddette değil. Hepsi aynı hızda ve aynı
 * güçte atsaydı ekran tek bir titreşen kalabalığa dönerdi ve gerçekten
 * dikkat isteyen nokta kaybolurdu. Hiyerarşi hız ve opaklıkla kuruluyor:
 *
 *   arıza      1.3 s   güçlü   çift halka
 *   çalışıyor  2.6 s   orta    tek halka
 *   duruyor    4.0 s   soluk   tek halka
 * -------------------------------------------------------------------------- */

.xc-model-point.is-ok .xc-model-point__halo {
  animation: xc-model-wave 2.6s ease-out infinite;
  opacity: .8;
}

.xc-model-point.is-info .xc-model-point__halo {
  animation: xc-model-wave 3.2s ease-out infinite;
  opacity: .75;
}

.xc-model-point.is-warn .xc-model-point__halo {
  animation: xc-model-wave 1.9s ease-out infinite;
  opacity: .9;
}

/* Duran ekipman en kalabalık gruptur; görünmeli ama dikkat çekmemeli. */
.xc-model-point.is-idle::before { opacity: .16; }
.xc-model-point.is-idle .xc-model-point__halo {
  animation: xc-model-wave 4s ease-out infinite;
  opacity: .5;
}

/* ---- Arıza: göze batmalı -------------------------------------------------- */

.xc-model-point.is-fault::before { opacity: .30; }
.xc-model-point.is-fault .xc-model-point__dot { width: 30px; height: 30px; font-size: 13px; }
.xc-model-point.is-fault .xc-model-point__halo {
  border-width: 3px;
  opacity: 1;
  animation: xc-model-wave 1.3s ease-out infinite;
}

/* İkinci, gecikmeli halka: yalnızca arızada. Tek halkanın kaybolduğu anda
   ekran boş kalmasın diye. */
.xc-model-point.is-fault::after {
  content: '';
  position: absolute; inset: 50% auto auto 50%;
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--xc-point-tone);
  transform: translate(-50%, -50%);
  animation: xc-model-wave 1.3s ease-out .65s infinite;
  pointer-events: none;
}

@keyframes xc-model-wave {
  0%   { transform: translate(-50%, -50%) scale(.5); opacity: .95; }
  70%  { opacity: .35; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/*
 * Hareket azaltma açıkken animasyon durur. Arızanın görünürlüğü animasyona
 * BIRAKILMAZ: halka sabit kalır, nokta büyük kalır.
 */
@media (prefers-reduced-motion: reduce) {
  /* Hareket kapaninca gorunurluk animasyona BIRAKILMAZ: halkalar sabit
     kalir, arizanin halkasi buyuk ve tam opak durur. */
  .xc-model-point .xc-model-point__halo,
  .xc-model-point.is-fault::after { animation: none !important; }
  .xc-model-point .xc-model-point__halo { opacity: .85; }
  .xc-model-point.is-idle .xc-model-point__halo { opacity: .5; }
  .xc-model-point.is-fault .xc-model-point__halo { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  .xc-model-point.is-fault::after { opacity: .5; }
}

/* Komut var, geri besleme yok: kesik halka. */
.xc-model-point.is-unconfirmed .xc-model-point__dot {
  border-style: dashed;
  border-color: var(--xc-point-tone);
}

/* Modelde koordinatı olmayan ekipmanlar */
.xc-model-unplaced {
  padding: var(--xc-3) var(--xc-4);
  border: 1px dashed var(--xc-line-strong);
  border-radius: var(--xc-r-md);
  background: var(--xc-surface);
}
.xc-model-unplaced__head {
  font: var(--xc-t-tag); letter-spacing: var(--xc-tag-track);
  text-transform: uppercase; color: var(--xc-text-faint);
  margin-bottom: var(--xc-2);
}
.xc-model-unplaced__list { display: flex; flex-wrap: wrap; gap: var(--xc-2); }

.xc-model-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px var(--xc-3);
  border: 1px solid var(--xc-line-strong); border-radius: var(--xc-r-pill);
  background: var(--xc-surface); color: var(--xc-text);
  font: var(--xc-t-meta); letter-spacing: .02em; cursor: pointer;
}
.xc-model-chip:hover { background: var(--xc-surface-sunken); }
.xc-model-chip.is-fault { border-color: var(--xc-fault-mark); color: var(--xc-fault-text); }
.xc-model-chip.is-warn  { border-color: var(--xc-warn-mark);  color: var(--xc-warn-text); }
.xc-model-chip.is-ok    { border-color: var(--xc-ok-mark); }

.xc-screen-tanks {
  display: grid;
  grid-template-columns: repeat(6, minmax(172px, 1fr));
  min-width: 1080px;
  gap: 1px;
  background: var(--xc-line);
}
.xc-screen-flow { overflow-x: auto; scrollbar-width: thin; }
.xc-screen-tank { min-width: 0; background: var(--xc-surface); }
.xc-screen-tank__vessel {
  position: relative;
  height: 292px;
  margin: var(--xc-3) var(--xc-2) 0;
  border: 1px solid var(--xc-line-strong);
  border-top-width: 3px;
  border-radius: var(--xc-r-sm) var(--xc-r-sm) 2px 2px;
  background: var(--xc-surface-sunken);
  overflow: hidden;
}
.xc-screen-tank__water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 78%;
  background: linear-gradient(to bottom, var(--xc-info-soft), var(--xc-info-mark));
  opacity: .72;
}
.xc-screen-tank.is-permeate .xc-screen-tank__water { height: 34%; opacity: .28; }
.xc-screen-tank__water::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -3px; height: 7px;
  border-top: 2px solid var(--xc-navy-bright);
  border-radius: 50%;
}
.xc-screen-tank__title {
  min-height: 48px;
  display: grid; place-items: center;
  padding: var(--xc-2);
  font: var(--xc-t-tag); text-align: center; color: var(--xc-navy);
  border-top: 1px solid var(--xc-line);
}
:root[data-theme="dark"] .xc-screen-tank__title { color: var(--xc-navy-bright); }

.xc-screen-tank__equipment {
  position: absolute; left: var(--xc-2); right: var(--xc-2); bottom: 12px;
  display: flex; justify-content: flex-start; z-index: 3;
}
.xc-screen-nodes {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 8px 10px; border-radius: 999px;
  background: var(--xc-halo); box-shadow: var(--xc-shadow-raised);
}
:root[data-theme="dark"] .xc-screen-nodes { background: var(--xc-surface-sunken); }
.xc-screen-node {
  width: 20px; height: 20px; padding: 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--xc-idle-mark);
  transition: transform .18s ease, filter .18s ease;
}
.xc-screen-node:hover, .xc-screen-node:focus-visible { transform: scale(1.12); filter: brightness(1.06); outline: none; }
.xc-screen-node__dot {
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--xc-idle-mark);
  color: var(--xc-on-mark);
  box-shadow: 0 0 0 3px var(--xc-halo), 0 0 0 1px var(--xc-idle-mark);
  font-size: 8px; font-weight: 700; line-height: 1;
  animation: none;
}

/* Process symbol status is intentionally explicit: active=green blink,
   fault=red blink, standby/offline=grey static. */
.xc-screen-node.is-ok .xc-screen-node__dot {
  background: var(--xc-ok-mark);
  box-shadow: 0 0 0 3px var(--xc-halo), 0 0 0 1px var(--xc-ok-mark);
  animation: xc-screen-active-blink 1.05s ease-in-out infinite;
}
.xc-screen-node.is-fault .xc-screen-node__dot {
  background: var(--xc-fault-mark);
  box-shadow: 0 0 0 3px var(--xc-halo), 0 0 0 1px var(--xc-fault-mark);
  animation: xc-screen-fault-blink .72s ease-in-out infinite;
}
.xc-screen-node.is-warn .xc-screen-node__dot {
  background: var(--xc-warn-mark);
  box-shadow: 0 0 0 3px var(--xc-halo), 0 0 0 1px var(--xc-warn-mark);
  animation: none;
}
.xc-screen-node.is-info .xc-screen-node__dot {
  background: var(--xc-info-mark);
  box-shadow: 0 0 0 3px var(--xc-halo), 0 0 0 1px var(--xc-info-mark);
  animation: none;
}
.xc-screen-node.is-idle .xc-screen-node__dot,
.xc-screen-node:not(.is-ok):not(.is-fault):not(.is-warn):not(.is-info) .xc-screen-node__dot {
  background: var(--xc-idle-mark);
  box-shadow: 0 0 0 3px var(--xc-halo), 0 0 0 1px var(--xc-idle-mark);
  animation: none;
}


@keyframes xc-screen-active-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .38; transform: scale(.88); }
}
@keyframes xc-screen-fault-blink {
  0%, 100% { opacity: 1; transform: scale(1.08); }
  50% { opacity: .20; transform: scale(.86); }
}

.xc-screen-tank__levels {
  position: absolute; right: var(--xc-2); top: var(--xc-3); z-index: 3;
  display: grid; gap: 5px; text-align: right;
}
.xc-screen-level {
  display: block; min-width: auto; height: auto; padding: 0;
  border: 0; background: transparent; box-shadow: none;
  color: var(--xc-idle-text); font: var(--xc-t-tag); font-size: 10px;
}
.xc-screen-level.is-ok { color: var(--xc-ok-text); }
.xc-screen-level.is-idle { color: var(--xc-idle-text); }
.xc-screen-level sup { font-size: 8px; }

.xc-screen-tank__membrane {
  position: absolute; top: 38px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 58px; height: 86px; display: grid; place-items: center;
  color: var(--xc-navy-deep); opacity: .82;
}
.xc-screen-tank__membrane .xc-screen-icon { width: 56px; height: 76px; }
:root[data-theme="dark"] .xc-screen-tank__membrane { color: var(--xc-text); }

.xc-screen-tank__bubbles { position: absolute; inset: 14% 8% 28%; z-index: 1; pointer-events: none; }
.xc-screen-tank__bubbles i {
  position: absolute; width: 8px; height: 8px; border: 2px solid var(--xc-surface); border-radius: 50%; opacity: .8;
}
.xc-screen-tank__bubbles i:nth-child(1) { left: 12%; bottom: 12%; }
.xc-screen-tank__bubbles i:nth-child(2) { left: 30%; bottom: 38%; width: 11px; height: 11px; }
.xc-screen-tank__bubbles i:nth-child(3) { left: 53%; bottom: 20%; width: 6px; height: 6px; }
.xc-screen-tank__bubbles i:nth-child(4) { left: 72%; bottom: 44%; width: 12px; height: 12px; }
.xc-screen-tank__bubbles i:nth-child(5) { left: 21%; bottom: 67%; width: 6px; height: 6px; }
.xc-screen-tank__bubbles i:nth-child(6) { left: 60%; bottom: 75%; width: 9px; height: 9px; }
.xc-screen-tank__bubbles i:nth-child(7) { left: 83%; bottom: 18%; width: 7px; height: 7px; }

.xc-screen-valves {
  display: grid;
  grid-template-columns: repeat(5, minmax(70px, 1fr));
  gap: var(--xc-2);
  padding: var(--xc-2);
}
.xc-screen-valve {
  display: grid; place-items: center; gap: 2px;
  min-height: 80px; padding: 6px 4px;
  border: 1px solid var(--xc-line); border-radius: var(--xc-r-sm);
  color: var(--xc-idle-text); background: var(--xc-surface);
}
.xc-screen-valve.is-ok { color: var(--xc-ok-text); border-color: var(--xc-ok-soft); }
.xc-screen-valve.is-fault { color: var(--xc-fault-text); border-color: var(--xc-fault-mark); background: var(--xc-fault-soft); }
.xc-screen-valve.is-warn { color: var(--xc-warn-text); border-color: var(--xc-warn-mark); background: var(--xc-warn-soft); }
.xc-screen-valve.is-info { color: var(--xc-info-text); }
.xc-screen-valve__icon .xc-screen-icon { width: 31px; height: 31px; }
.xc-screen-valve__code { font: var(--xc-t-tag); color: var(--xc-text); }
.xc-screen-valve__state { font: var(--xc-t-meta); color: currentColor; text-align: center; }

.xc-screen-readings__list { display: grid; }
.xc-screen-reading {
  display: grid; grid-template-columns: 44px 1fr; gap: var(--xc-3); align-items: center;
  min-height: 82px; padding: var(--xc-3);
  border-bottom: 1px solid var(--xc-line);
}
.xc-screen-reading:last-child { border-bottom: 0; }
.xc-screen-reading.is-empty { background: var(--xc-surface-sunken); }
.xc-screen-reading__icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--xc-info-soft); color: var(--xc-info-text);
}
.xc-screen-reading.is-warn .xc-screen-reading__icon { background: var(--xc-warn-soft); color: var(--xc-warn-text); }
.xc-screen-reading.is-fault .xc-screen-reading__icon { background: var(--xc-fault-soft); color: var(--xc-fault-text); }
.xc-screen-reading.is-empty .xc-screen-reading__icon { background: var(--xc-idle-soft); color: var(--xc-idle-text); }
.xc-screen-reading__label { font: var(--xc-t-meta); color: var(--xc-text-muted); }
.xc-screen-reading__value { font: var(--xc-t-h1); font-variant-numeric: var(--xc-nums); color: var(--xc-navy-bright); line-height: 1.15; }
.xc-screen-reading__value small { margin-left: 4px; font: var(--xc-t-meta); color: var(--xc-text-muted); }
.xc-screen-reading__value .is-nodata { color: var(--xc-text-faint); }
.xc-screen-reading__note { margin-top: 2px; font: var(--xc-t-meta); color: var(--xc-text-faint); }

.xc-screen-statushero {
  display: flex; align-items: center; gap: var(--xc-3);
  padding: var(--xc-4);
  border-bottom: 1px solid var(--xc-line);
  background: var(--xc-idle-soft);
}
.xc-screen-statushero.is-ok { background: var(--xc-ok-soft); color: var(--xc-ok-text); }
.xc-screen-statushero.is-fault { background: var(--xc-fault-soft); color: var(--xc-fault-text); }
.xc-screen-statushero.is-warn { background: var(--xc-warn-soft); color: var(--xc-warn-text); }
.xc-screen-statushero.is-info { background: var(--xc-info-soft); color: var(--xc-info-text); }
.xc-screen-statushero__lamp {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: currentColor; box-shadow: inset 0 0 0 5px var(--xc-surface);
}
.xc-screen-statushero__label { font: var(--xc-t-meta); color: var(--xc-text-muted); }
.xc-screen-statushero__value { font: var(--xc-t-h2); color: currentColor; }
.xc-screen-statusgrid { display: grid; }
.xc-screen-statusgrid > div {
  display: flex; justify-content: space-between; align-items: center; gap: var(--xc-3);
  padding: 10px var(--xc-3); border-bottom: 1px solid var(--xc-line);
}
.xc-screen-statusgrid > div:last-child { border-bottom: 0; }
.xc-screen-statusgrid span { font: var(--xc-t-meta); color: var(--xc-text-muted); }
.xc-screen-statusgrid b { font: var(--xc-t-small); font-variant-numeric: var(--xc-nums); color: var(--xc-text); }
.xc-screen-statusgrid b.is-ok { color: var(--xc-ok-text); }
.xc-screen-statusgrid b.is-fault { color: var(--xc-fault-text); }
.xc-screen-statusgrid b.is-warn { color: var(--xc-warn-text); }

body.is-screen-modal-open { overflow: hidden; }
.xc-screen-modal[hidden] { display: none !important; }
.xc-screen-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
}
.xc-screen-modal__backdrop {
  position: absolute; inset: 0;
  background: var(--xc-scrim);
  backdrop-filter: blur(2px);
}
.xc-screen-modal__dialog {
  position: relative; z-index: 1;
  width: min(460px, calc(100vw - 32px));
  border-radius: var(--xc-r-lg);
  border: 1px solid var(--xc-line);
  background: var(--xc-surface);
  box-shadow: var(--xc-shadow-float);
  overflow: hidden;
}

/*
 * Tam ekranda açılan ekipman penceresi, bilgi kartlarının birebir aynısı:
 * aynı buzlu cam, aynı başlık düzeni, aynı satır dili. İki farklı kart dili
 * olmaması için pencere .xc-fs-card sınıfını da taşıyor ve stilin çoğunu
 * oradan alıyor.
 */
.xc-fs .xc-screen-modal__backdrop { background: rgba(6, 22, 48, .42); }

.xc-fs .xc-screen-modal__dialog {
  width: min(420px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(3, 14, 34, .45);
  color: var(--xc-on-blueprint);
}

/* Başlık aynı zamanda sürükleme tutamağı. */
.xc-fs .xc-screen-modal__dialog .xc-fs-card__head { cursor: grab; touch-action: none; }
.xc-fs .xc-screen-modal__dialog.is-dragging { cursor: grabbing; z-index: 950; }
.xc-fs .xc-screen-modal__dialog.is-dragging .xc-fs-card__head { cursor: grabbing; }

.xc-fs-card__x {
  width: 28px; height: 28px; flex: none;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: var(--xc-on-blueprint);
  font: 400 18px/1 var(--xc-font);
}
.xc-fs-card__x:hover { background: rgba(255, 255, 255, .26); }
.xc-screen-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--xc-3);
  padding: 14px 16px 6px;
}
.xc-screen-modal__eyebrow {
  font: var(--xc-t-tag); letter-spacing: .045em; color: var(--xc-text-faint);
}
.xc-screen-modal__close {
  width: 34px; height: 34px;
  border: 0; border-radius: 50%; cursor: pointer;
  color: var(--xc-text); background: var(--xc-surface-sunken);
  font-size: 22px; line-height: 1;
}
.xc-screen-modal__title {
  padding: 0 16px 8px;
  font: var(--xc-t-h2); color: var(--xc-navy-bright);
}
.xc-screen-modal__body { padding: 0 16px 16px; }
.xc-screen-modal__grid {
  display: grid; gap: 8px;
}
.xc-screen-modal__grid > div {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--xc-line); border-radius: var(--xc-r-sm);
  background: var(--xc-surface-sunken);
}
.xc-screen-modal__grid span {
  font: var(--xc-t-meta); color: var(--xc-text-muted);
}
.xc-screen-modal__grid b {
  font: var(--xc-t-body-md); color: var(--xc-text); text-align: right;
}

@media (max-width: 1380px) {
  .xc-screen-layout { grid-template-columns: 1fr; }
  .xc-screen-side { position: static; grid-template-columns: 1.5fr 1fr; }
  .xc-screen-readings__list { grid-template-columns: repeat(5, 1fr); }
  .xc-screen-reading { grid-template-columns: 34px 1fr; min-height: 92px; padding: var(--xc-2); border-bottom: 0; border-right: 1px solid var(--xc-line); }
  .xc-screen-reading:last-child { border-right: 0; }
  .xc-screen-reading__icon { width: 34px; height: 34px; }
  .xc-screen-sensor-icon { width: 25px; height: 25px; }
  .xc-screen-reading__value { font: var(--xc-t-h2); }
}

@media (max-width: 1180px) {
  .xc-screen-topgrid { grid-template-columns: 1fr 1fr; }
  .xc-screen-topgrid .is-blowers { grid-column: 1 / -1; }
  .xc-screen-bottomgrid { grid-template-columns: 1fr 1fr; }
  .xc-screen-bottomgrid .is-valves { grid-column: 1 / -1; }
  .xc-screen-signal-sections { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .xc-screen-header { align-items: flex-start; flex-direction: column; }
  .xc-screen-legend { justify-content: flex-start; }
  .xc-screen-layout { padding: var(--xc-2); gap: var(--xc-2); }
  .xc-screen-main, .xc-screen-side { gap: var(--xc-2); }
  .xc-screen-topgrid, .xc-screen-bottomgrid, .xc-screen-side { grid-template-columns: 1fr; }
  .xc-screen-topgrid .is-blowers, .xc-screen-bottomgrid .is-valves { grid-column: auto; }
  .xc-screen-readings__list { grid-template-columns: 1fr 1fr; }
  .xc-screen-reading { border-right: 0; border-bottom: 1px solid var(--xc-line); }
  .xc-screen-valves { grid-template-columns: repeat(3, minmax(72px, 1fr)); }
}

@media (max-width: 520px) {
  .xc-screen-header { padding: var(--xc-3); }
  .xc-screen-header h2 { font: var(--xc-t-h2); }
  .xc-screen-box__equipment { grid-template-columns: 1fr 1fr; }
  .xc-screen-box.is-raw .xc-screen-box__equipment,
  .xc-screen-box.is-disinfection .xc-screen-box__equipment { grid-template-columns: 1fr; }
  .xc-screen-readings__list { grid-template-columns: 1fr; }
  .xc-screen-valves { grid-template-columns: repeat(2, minmax(72px, 1fr)); }
}
.xc-screen-reading.is-stale { opacity: .68; }
.xc-screen-reading.is-stale .xc-screen-reading__value { color: var(--xc-idle-text); }

/* =============================================================================
   Ekran sekmesi — kompakt HMI yerleşimi v2
   Kullanıcı isteği: yaklaşık %30 küçültme + proses değerleri ve aktif arızalar
   ekranın üstünde yatay şeritler.
   ============================================================================= */

/* Ana proses ekranını yaklaşık %30 daha kompakt tut. */
.xc-main--plant > [data-panel="screen"] { max-width: 1800px; }
.xc-screen-header { gap: 14px; padding: 10px 14px; }
.xc-screen-header h2 { font-size: 16px; line-height: 1.15; }
.xc-screen-header__eyebrow,
.xc-screen-header__meta,
.xc-screen-legend > span { font-size: 9px; }
.xc-screen-legend { gap: 9px; }
.xc-screen-legend i { width: 6px; height: 6px; }

.xc-screen-topbars {
  display: grid;
  gap: 8px;
  padding: 8px 8px 0;
}

.xc-screen-layout {
  display: block;
  padding: 8px;
}
.xc-screen-main { gap: 8px; }
.xc-screen-side { display: none; }

.xc-screen-box__title,
.xc-screen-flow__title {
  padding: 6px 8px;
  font-size: 9px;
  line-height: 1.1;
}
.xc-screen-box__body { padding: 6px; }

.xc-screen-topgrid {
  grid-template-columns: minmax(150px,.75fr) minmax(290px,1.7fr) minmax(340px,2fr);
  gap: 8px;
}
.xc-screen-bottomgrid {
  grid-template-columns: minmax(320px,1.5fr) minmax(126px,.65fr) minmax(290px,1.35fr);
  gap: 8px;
}
.xc-screen-box__equipment {
  grid-template-columns: 1fr;
  gap: 6px;
}
.xc-screen-box__equipment--list { display: grid; grid-template-columns: 1fr; gap: 6px; }

.xc-screen-eq { min-height: 54px; padding: 6px; }
.xc-screen-icon, .xc-screen-sensor-icon { width: 22px; height: 22px; }
.xc-screen-eq__code { font-size: 9px; }
.xc-screen-eq__name,
.xc-screen-eq__sub { font-size: 8px; }
.xc-screen-eq__role { font-size: 7px; }
.xc-screen-eq__verify { width: 11px; height: 11px; font-size: 7px; }
.xc-screen-eq__state { padding: 2px 5px; font-size: 7px; }

.xc-screen-tanks {
  grid-template-columns: repeat(6,minmax(120px,1fr));
  min-width: 756px;
}
.xc-screen-tank__vessel {
  height: 204px;
  margin: 8px 6px 0;
}
.xc-screen-tank__title {
  min-height: 34px;
  padding: 5px;
  font-size: 8px;
  line-height: 1.1;
}
.xc-screen-tank__equipment { left: 6px; right: 6px; bottom: 6px; gap: 3px; }

.xc-screen-tank__levels { right: 6px; top: 8px; gap: 3px; }
.xc-screen-level { font-size: 7px; }
.xc-screen-tank__membrane { top: 27px; width: 41px; height: 60px; }
.xc-screen-tank__membrane .xc-screen-icon { width: 39px; height: 53px; }

.xc-screen-valves {
  grid-template-columns: repeat(5,minmax(49px,1fr));
  gap: 6px;
  padding: 6px;
}
.xc-screen-valve { min-height: 56px; padding: 4px 3px; }
.xc-screen-valve__icon .xc-screen-icon { width: 22px; height: 22px; }
.xc-screen-valve__code { font-size: 8px; }
.xc-screen-valve__state { font-size: 7px; }

/* Canlı proses değerleri artık en üstte ve tamamen yatay. */
.xc-screen-readings--top .xc-screen-readings__list {
  display: grid;
  grid-template-columns: repeat(5,minmax(110px,1fr));
  min-width: 650px;
}
.xc-screen-signal-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.xc-screen-signals__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 6px 8px;
}
.xc-screen-signal {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; min-height: 0;
  border-bottom: 1px solid var(--xc-line);
  background: transparent;
}
.xc-screen-signal:last-child { border-bottom: 0; }
.xc-screen-signal__main { min-width: 0; }
.xc-screen-signal__name { font-size: 8px; color: var(--xc-text); line-height: 1.2; }
.xc-screen-signal__meta { margin-top: 2px; font-size: 7px; color: var(--xc-text-faint); }
.xc-screen-signal__state { margin-top: 0; font-size: 8px; color: var(--xc-idle-text); white-space: nowrap; }
.xc-screen-signal.is-ok .xc-screen-signal__state { color: var(--xc-ok-text); }
.xc-screen-signal.is-fault .xc-screen-signal__state { color: var(--xc-fault-text); }
.xc-screen-signal.is-warn .xc-screen-signal__state { color: var(--xc-warn-text); }
.xc-screen-signal.is-idle .xc-screen-signal__state { color: var(--xc-idle-text); }
.xc-screen-readings--top { overflow-x: auto; }
.xc-screen-reading {
  grid-template-columns: 28px 1fr;
  min-height: 58px;
  padding: 6px 8px;
  border-right: 1px solid var(--xc-line);
  border-bottom: 0;
}
.xc-screen-reading:last-child { border-right: 0; }
.xc-screen-reading__icon { width: 28px; height: 28px; }
.xc-screen-reading__label { font-size: 8px; }
.xc-screen-reading__value { font-size: 15px; line-height: 1.05; }
.xc-screen-reading__value small,
.xc-screen-reading__note { font-size: 7px; }

/* Aktif arıza listesi üstte yataydır; gerçek ekipman/valf durumundan üretilir. */
.xc-screen-faultsbar { overflow-x: auto; }
.xc-screen-faultsbar__list {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  min-height: 42px;
}
.xc-screen-faultchip {
  flex: 0 0 auto;
  min-width: 145px;
  max-width: 240px;
  display: grid;
  grid-template-columns: 7px auto minmax(0,1fr);
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-sm);
  background: var(--xc-surface);
  color: var(--xc-text-muted);
  font-size: 8px;
}
.xc-screen-faultchip strong { font-size: 9px; color: var(--xc-text); white-space: nowrap; }
.xc-screen-faultchip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xc-screen-faultchip__lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--xc-idle-mark); }
.xc-screen-faultchip.is-fault { border-color: var(--xc-fault-mark); background: var(--xc-fault-soft); color: var(--xc-fault-text); }
.xc-screen-faultchip.is-fault .xc-screen-faultchip__lamp { background: var(--xc-fault-mark); }
.xc-screen-faultchip.is-ok { border-color: var(--xc-ok-soft); color: var(--xc-ok-text); }
.xc-screen-faultchip.is-ok .xc-screen-faultchip__lamp { background: var(--xc-ok-mark); }

/* Sistem durumu da yatay, ince bir üst şerit olarak korunur. */
.xc-screen-statusbox {
  display: grid;
  grid-template-columns: 120px minmax(180px,1fr) minmax(360px,2fr);
  align-items: stretch;
}
.xc-screen-statusbox > .xc-screen-box__title {
  display: grid; place-items: center;
  border-bottom: 0;
  border-right: 1px solid var(--xc-line);
}
.xc-screen-statushero {
  min-height: 48px;
  padding: 6px 10px;
  border-bottom: 0;
  border-right: 1px solid var(--xc-line);
}
.xc-screen-statushero__lamp { width: 8px; height: 8px; }
.xc-screen-statushero__label { font-size: 7px; }
.xc-screen-statushero__value { font-size: 11px; }
.xc-screen-statusgrid {
  grid-template-columns: repeat(4,1fr);
}
.xc-screen-statusgrid > div {
  min-height: 48px;
  padding: 5px 8px;
  border-bottom: 0;
  border-right: 1px solid var(--xc-line);
}
.xc-screen-statusgrid > div:last-child { border-right: 0; }
.xc-screen-statusgrid span { font-size: 7px; }
.xc-screen-statusgrid b { font-size: 9px; }

@media (max-width: 1050px) {
  .xc-screen-readings--top .xc-screen-readings__list { grid-template-columns: repeat(5,minmax(105px,1fr)); }
  .xc-screen-statusbox { grid-template-columns: 100px 160px minmax(330px,1fr); overflow-x:auto; }
  .xc-screen-topgrid { grid-template-columns: 1fr 1fr; }
  .xc-screen-topgrid .is-blowers { grid-column: 1 / -1; }
  .xc-screen-bottomgrid { grid-template-columns: 1fr 1fr; }
  .xc-screen-bottomgrid .is-valves { grid-column: 1 / -1; }
  .xc-screen-signal-sections { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .xc-screen-header { align-items:flex-start; flex-direction:column; }
  .xc-screen-topgrid,
  .xc-screen-bottomgrid,
  .xc-screen-signal-sections { grid-template-columns:1fr; }
  .xc-screen-topgrid .is-blowers,
  .xc-screen-bottomgrid .is-valves { grid-column:auto; }
  .xc-screen-statusbox { display:block; }
  .xc-screen-statusbox > .xc-screen-box__title,
  .xc-screen-statushero { border-right:0; border-bottom:1px solid var(--xc-line); }
  .xc-screen-statusgrid { grid-template-columns:repeat(2,1fr); }
  .xc-screen-statusgrid > div { border-bottom:1px solid var(--xc-line); }
}


/* =============================================================================
   Ekran sekmesi v6 — ultra-kompakt ekipman ve sinyal satirlari
   ============================================================================= */

/* Ekipman kutulari, ariza ozetindeki chip mantigina cekildi. */
.xc-screen-box__equipment,
.xc-screen-box__equipment--list {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 4px !important;
  grid-template-columns: none !important;
}
.xc-screen-box.is-raw .xc-screen-box__equipment,
.xc-screen-box.is-disinfection .xc-screen-box__equipment {
  display: flex !important;
}
.xc-screen-eq {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid !important;
  grid-template-columns: 6px auto auto !important;
  align-items: center;
  gap: 5px !important;
  min-height: 0 !important;
  height: 28px;
  padding: 3px 7px !important;
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-pill);
  background: var(--xc-surface);
  overflow: visible;
  white-space: nowrap;
}
.xc-screen-eq::before { display: none !important; }
.xc-screen-eq__lamp {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xc-idle-mark);
}
.xc-screen-eq.is-ok .xc-screen-eq__lamp { background: var(--xc-ok-mark); }
.xc-screen-eq.is-fault .xc-screen-eq__lamp { background: var(--xc-fault-mark); }
.xc-screen-eq.is-warn .xc-screen-eq__lamp { background: var(--xc-warn-mark); }
.xc-screen-eq.is-info .xc-screen-eq__lamp { background: var(--xc-info-mark); }
.xc-screen-eq.is-idle .xc-screen-eq__lamp { background: var(--xc-idle-mark); }
.xc-screen-eq__code {
  font-size: 9px !important;
  line-height: 1;
  font-weight: 700;
}
.xc-screen-eq__state {
  padding: 2px 5px !important;
  margin: 0 !important;
  font-size: 7px !important;
  line-height: 1;
  border-radius: var(--xc-r-pill);
}
.xc-screen-eq__name,
.xc-screen-eq__sub,
.xc-screen-eq__details,
.xc-screen-eq__line,
.xc-screen-eq__role,
.xc-screen-eq__verify,
.xc-screen-eq__icon {
  display: none !important;
}

/* Grup kutularinda gereksiz yukseklik ve bosluklari azalt. */
.xc-screen-box__body { padding: 4px !important; }
.xc-screen-box__title,
.xc-screen-flow__title { padding: 5px 7px !important; }
.xc-screen-topgrid,
.xc-screen-bottomgrid,
.xc-screen-main { gap: 6px !important; }

/* Sistem + seviye sinyalleri: kart degil, tek satirlik yogun liste. */
.xc-screen-signal-sections {
  gap: 6px !important;
  margin-top: 6px !important;
}
.xc-screen-signals__grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  padding: 2px 7px !important;
}
.xc-screen-signal {
  display: grid !important;
  grid-template-columns: 6px minmax(0,1fr) auto;
  align-items: center;
  gap: 6px !important;
  min-height: 0 !important;
  height: 25px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--xc-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  white-space: nowrap;
}
.xc-screen-signal:last-child { border-bottom: 0 !important; }
.xc-screen-signal__lamp {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xc-idle-mark);
}
.xc-screen-signal.is-ok .xc-screen-signal__lamp { background: var(--xc-ok-mark); }
.xc-screen-signal.is-fault .xc-screen-signal__lamp { background: var(--xc-fault-mark); }
.xc-screen-signal.is-warn .xc-screen-signal__lamp { background: var(--xc-warn-mark); }
.xc-screen-signal.is-info .xc-screen-signal__lamp { background: var(--xc-info-mark); }
.xc-screen-signal.is-idle .xc-screen-signal__lamp { background: var(--xc-idle-mark); }
.xc-screen-signal__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 8px !important;
  line-height: 1 !important;
}
.xc-screen-signal__state {
  margin: 0 !important;
  font-size: 8px !important;
  line-height: 1 !important;
  white-space: nowrap;
}
.xc-screen-signal__main,
.xc-screen-signal__meta { display: none !important; }

/* Mobilde de bosluk buyutme; chip'ler satir kirarak devam etsin. */
@media (max-width: 700px) {
  .xc-screen-eq { height: 27px; padding: 3px 6px !important; }
  .xc-screen-signal { height: 24px; }
}

/* =============================================================================
   TAM EKRAN ÜNİTE İZLEME
   Blueprint yüzeyi tam ekranı kaplar; bilgi kartları onun üzerinde buzlu cam
   katman olarak durur. Renklerin tamamı tokens.css'ten gelir.
   ============================================================================= */

body.is-fs-open { overflow: hidden; }

.xc-fs {
  position: fixed; inset: 0; z-index: 900;
  display: grid; grid-template-rows: auto 1fr;
  /* Izgara artik burada degil: sahnenin icinde ve gorselle birlikte
     hareket ediyor (.xc-fs-stage__grid). */
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.06), transparent 60%),
    var(--xc-blueprint);
  color: var(--xc-on-blueprint);
  isolation: isolate;

  /* Durum renkleri mavi zemin için parlak varyantlar; model yüzeyiyle aynı. */
  --xc-ok-mark:    var(--xc-ok-bright);
  --xc-fault-mark: var(--xc-fault-bright);
  --xc-warn-mark:  var(--xc-warn-bright);
  --xc-info-mark:  var(--xc-info-bright);
  --xc-idle-mark:  var(--xc-idle-bright);
  --xc-surface:    var(--xc-blueprint);
  --xc-on-mark:    var(--xc-blueprint);
}

/* ---- Üst şerit ---------------------------------------------------------- */

.xc-fs__head {
  display: flex; align-items: center; gap: var(--xc-4);
  padding: var(--xc-4) var(--xc-5);
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}
.xc-fs__ident h2 { font: var(--xc-t-h1); letter-spacing: -.01em; }
.xc-fs__ident p  { font: var(--xc-t-small); opacity: .72; margin-top: 2px; }
.xc-fs__live { margin-left: auto; display: flex; align-items: center; gap: var(--xc-3); }
.xc-fs__age  { font: var(--xc-t-meta); opacity: .72; }

.xc-fs__exit {
  display: inline-flex; align-items: center; gap: var(--xc-2);
  min-height: var(--xc-tap); padding: 0 var(--xc-4);
  border: 1px solid rgba(255,255,255,.28); border-radius: var(--xc-r-md);
  background: rgba(255,255,255,.10); color: var(--xc-on-blueprint);
  font: var(--xc-t-body-md); cursor: pointer;
}
.xc-fs__exit:hover { background: rgba(255,255,255,.18); }
.xc-fs__exit span { font-size: 20px; line-height: 1; }

/* ---- Gövde -------------------------------------------------------------- */

.xc-fs__body {
  display: grid; grid-template-columns: 320px 1fr 340px;
  gap: var(--xc-4); padding: var(--xc-4); min-height: 0;
}
.xc-fs__col { display: grid; gap: var(--xc-3); align-content: start; overflow-y: auto; min-height: 0; }
.xc-fs__center { display: grid; grid-template-rows: 1fr auto auto; gap: var(--xc-3); min-height: 0; }

/* ---- Sahne: aynı anda tek görünüş --------------------------------------- */

.xc-fs-stage { position: relative; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
.xc-fs-stage.is-panning { cursor: grabbing; }
.xc-fs-stage__layer {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--xc-medium) var(--xc-ease);
}
.xc-fs-stage__layer.is-active { opacity: 1; visibility: visible; }
.xc-fs-stage__frame {
  position: relative;
  max-width: 100%; max-height: 100%;
  width: auto; height: 100%;
  transform-origin: center center;
  will-change: transform;
}
.xc-fs-stage__layer img {
  display: block; width: 100%; height: 100%;
  filter: invert(1); mix-blend-mode: screen;
}
/* Nokta katmanı görselin kutusuyla birebir aynı. */
.xc-fs-stage__points { position: absolute; inset: 0; }

.xc-fs__viewtoggle { display: flex; align-items: center; justify-content: center; gap: var(--xc-3); }
.xc-fs__viewname { font: var(--xc-t-body-md); opacity: .8; }
.xc-fs__unplaced:empty { display: none; }

.xc-fs-zoom {
  position: absolute; z-index: 12; right: 12px; bottom: 12px;
  display: flex; gap: 5px; padding: 5px;
  border: 1px solid rgba(255,255,255,.18); border-radius: var(--xc-r-md);
  background: rgba(10,41,83,.68); backdrop-filter: blur(12px);
}
.xc-fs-zoom button {
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--xc-r-sm);
  background: rgba(255,255,255,.12); color: var(--xc-on-blueprint);
  font: 600 18px/1 var(--xc-font); cursor: pointer;
}
.xc-fs-zoom button:hover { background: rgba(255,255,255,.23); }

/* ---- Buzlu cam kartlar --------------------------------------------------- */

.xc-fs-card {
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--xc-r-lg);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(14px) saturate(120%);
  overflow: hidden;
}
.xc-fs-card__head {
  display: flex; align-items: center; gap: var(--xc-3);
  padding: var(--xc-3) var(--xc-4);
  cursor: pointer; list-style: none;
  font: var(--xc-t-body-md);
  touch-action: none;
}
.xc-fs-card__head::-webkit-details-marker { display: none; }
.xc-fs-card__icon {
  width: 26px; height: 26px; border-radius: var(--xc-r-sm);
  display: grid; place-items: center;
  background: rgba(255,255,255,.12); font-size: 13px;
}
.xc-fs-card__title { flex: 1; }
.xc-fs-card__badge:empty { display: none; }
.xc-fs-card__badge {
  padding: 1px 7px; border-radius: var(--xc-r-pill);
  background: rgba(255,255,255,.16); font: var(--xc-t-tag);
}
.xc-fs-card__badge.is-fault { background: var(--xc-fault-mark); color: var(--xc-blueprint); }
.xc-fs-card__chev { opacity: .6; transition: transform var(--xc-fast) var(--xc-ease); }
.xc-fs-card[open] .xc-fs-card__chev { transform: rotate(180deg); }
.xc-fs-card__body { padding: 0 var(--xc-4) var(--xc-3); }

.xc-fs-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--xc-3);
  padding: 7px 0; border-top: 1px solid rgba(255,255,255,.10);
  font: var(--xc-t-small);
}
.xc-fs-row span { opacity: .74; }
.xc-fs-row b { font-weight: 600; text-align: right; }
.xc-fs-row b small { font-weight: 400; opacity: .7; margin-left: 3px; }
.xc-fs-row b.is-ok    { color: var(--xc-ok-mark); }
.xc-fs-row b.is-fault { color: var(--xc-fault-mark); }
.xc-fs-row b.is-warn  { color: var(--xc-warn-mark); }
.xc-fs-row b.is-info  { color: var(--xc-info-mark); }
.xc-fs-row b .is-nodata { opacity: .55; font-weight: 400; }

.xc-fs-empty { font: var(--xc-t-small); opacity: .6; padding: var(--xc-3) 0; }

.xc-fs-fault, .xc-fs-eq {
  display: flex; align-items: center; gap: var(--xc-3);
  width: 100%; text-align: left; cursor: pointer;
  padding: 8px 0; border: 0; border-top: 1px solid rgba(255,255,255,.10);
  background: none; color: inherit; font: var(--xc-t-small);
}
.xc-fs-fault:hover, .xc-fs-eq:hover { background: rgba(255,255,255,.06); }
.xc-fs-fault b { display: block; }
.xc-fs-fault small { opacity: .6; }
.xc-fs-eq__name { flex: 1; }
.xc-fs-eq__code { font: var(--xc-t-meta); opacity: .6; }
.xc-fs-group {
  font: var(--xc-t-tag); letter-spacing: var(--xc-tag-track); text-transform: uppercase;
  opacity: .55; padding: var(--xc-3) 0 2px;
}

@media (min-width: 1181px) {
  .xc-fs-card.is-dragging,
  .xc-fs-card[style*="left:"] {
    position: fixed; z-index: 940; width: min(340px, calc(100vw - 12px));
    max-height: calc(100vh - 88px); overflow: auto;
    box-shadow: 0 22px 60px rgba(0,0,0,.30);
  }
  .xc-fs-card.is-dragging { cursor: grabbing; user-select: none; }
  .xc-fs-card__head { cursor: grab; }
}

/* ---- Dar ekran: kartlar görselin altına iner ----------------------------- */

@media (max-width: 1180px) {
  .xc-fs__body {
    grid-template-columns: 1fr; overflow-y: auto;
    grid-template-rows: minmax(300px, 46vh) auto auto;
  }
  .xc-fs__col { overflow: visible; }
  .xc-fs__col--left  { order: 2; }
  .xc-fs__center     { order: 1; }
  .xc-fs__col--right { order: 3; }
}

@media (max-width: 640px) {
  .xc-fs__head { flex-wrap: wrap; gap: var(--xc-2); }
  .xc-fs__live { margin-left: 0; width: 100%; order: 3; }
  .xc-fs__ident h2 { font: var(--xc-t-h2); }
}

/* Mobile: natural-height content prevents equipment cards being squeezed. */
@media (max-width: 1180px) {
  .xc-fs__head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 12px; }
  .xc-fs__ident { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
  .xc-fs__mute { grid-column: 2; grid-row: 1; }
  .xc-fs__exit { grid-column: 3; grid-row: 1; align-self: start; padding: 0 10px; }
  .xc-fs__live { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; margin: 0; width: auto; }
  .xc-fs__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: max-content; align-content: start; overflow-y: auto; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .xc-fs__col { display: contents; }
  .xc-fs__center { grid-column: 1 / -1; order: 0; height: clamp(280px, 46vh, 520px); }
  .xc-fs__col > details.xc-fs-card { order: 2; min-width: 0; height: auto; max-height: none; position: relative; left: auto !important; top: auto !important; }
  .xc-fs__col > details[data-card="levels"] { order: 1; grid-column: 1 / -1; }
  .xc-fs__body { gap: 12px; padding-left: 12px; padding-right: 12px; }
  .xc-fs__col > details.xc-fs-card {
    border-radius: 14px; border-color: rgba(180,213,255,.19);
    background: linear-gradient(145deg, rgba(124,171,235,.16), rgba(79,125,192,.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 12px rgba(0,15,44,.08);
  }
  .xc-fs__col > details[open] { grid-column: 1 / -1; border-color: rgba(155,202,255,.34); }
  .xc-fs__col .xc-fs-card__head {
    box-sizing: border-box; min-height: 72px; display: grid;
    grid-template-columns: 28px minmax(0,1fr) 12px;
    align-content: center; align-items: center; text-align: left;
    padding: 12px; gap: 5px 9px; cursor: pointer; touch-action: pan-y;
  }
  .xc-fs__col .xc-fs-card__icon {
    grid-column: 1; grid-row: 1 / span 2; width: 28px; height: 28px;
    border-radius: 9px; background: rgba(155,199,255,.12);
    border: 1px solid rgba(190,218,255,.12); color: #d4e7ff; font-size: 15px;
  }
  .xc-fs__col .xc-fs-card__title {
    grid-column: 2; grid-row: 1; min-width: 0; font-size: 13px;
    font-weight: 500; line-height: 1.35; overflow-wrap: anywhere;
  }
  .xc-fs__col .xc-fs-card__chev {
    display: block; grid-column: 3; grid-row: 1 / span 2;
    font-size: 16px; opacity: .55;
  }
  .xc-fs__col .xc-fs-card__badge {
    position: static; grid-column: 2; grid-row: 2; justify-self: start;
    min-width: 22px; padding: 1px 7px; text-align: center;
    font-size: 11px; line-height: 17px; font-weight: 600;
    background: rgba(177,207,248,.14); color: #dfedff;
  }
  .xc-fs__col .xc-fs-card__badge.is-fault { background: #ff594f; color: #fff; }
  .xc-fs__col .xc-fs-card__body { max-height: none; overflow: visible; padding: 0 12px 12px; }
  .xc-fs__col .xc-fs-card__head:focus-visible { outline: 2px solid #afd5ff; outline-offset: -3px; border-radius: 13px; }
  .xc-fs__col .xc-fs-card__head:active { background: rgba(188,218,255,.09); }

}

/* Ekran sekmesi artık bir düğme */
.xc-tab--action {
  border: 0; background: none; cursor: pointer; font: var(--xc-t-body-md);
  color: var(--xc-text-muted); padding: var(--xc-3) var(--xc-4);
  border-bottom: 2px solid transparent;
}
.xc-tab--action:hover { color: var(--xc-text); }




/* =============================================================================
   Tam ekran: görsel tüm sayfayı kaplar, kartlar üzerine biner
   Görsel artık ayrı bir sütunda değil; gövdenin tamamını dolduruyor ve
   kaydırılıp yakınlaştırılabiliyor. Kartlar onun üzerinde yüzen buzlu cam
   katmanlar olarak duruyor.
   ============================================================================= */

@media (min-width: 1181px) {
  .xc-fs__body {
    display: block; position: relative;
    padding: 0; overflow: hidden;
  }

  .xc-fs__center {
    position: absolute; inset: 0;
    display: block; gap: 0;
  }

  .xc-fs-stage { position: absolute; inset: 0; }

  /* Kartlar görselin üstünde yüzer. Sütunun kendisi tıklamaları geçirir;
     yalnızca kartlar yakalar. Böylece kartların arasındaki boşluktan
     görsel kaydırılabilir. */
  .xc-fs__col {
    position: absolute; top: var(--xc-4); bottom: var(--xc-4);
    width: 330px; z-index: 5;
    overflow-y: auto; overscroll-behavior: contain;
    pointer-events: none;
    scrollbar-width: thin;
  }
  .xc-fs__col > * { pointer-events: auto; }
  .xc-fs__col--left  { left: var(--xc-4); }
  .xc-fs__col--right { right: var(--xc-4); }

  .xc-fs__viewtoggle,
  .xc-fs__unplaced {
    position: absolute; left: 50%; transform: translateX(-50%);
    bottom: var(--xc-4); z-index: 6; max-width: min(560px, 46vw);
  }
  .xc-fs__unplaced { bottom: var(--xc-4); }
  .xc-fs__viewtoggle:not(:empty) ~ .xc-fs__unplaced { bottom: 64px; }
}

/* Render (fotoğraf) görünüşü: çizim değil, karışım uygulanmaz. */
.xc-fs-stage__frame.is-photo img {
  filter: none;
  mix-blend-mode: normal;
}

/*
 * Dört kenardan fade.
 *
 * Maske GÖRSELİN değil SAHNENİN üstünde. Görselde olsaydı yumuşama görselle
 * birlikte kayardı ve kaydırınca kenarda sert bir kesik görünürdü. Sahnede
 * olduğu için görsel fade'in ARKASINDAN geçiyor: kenarlar her zaman aynı
 * yerde yumuşuyor.
 */
/*
 * Zemin düzlemi.
 *
 * Kareler dik değil, konteynerin izometrik eksenlerine yatırılmış. Açıyı
 * render'dan ölçtüm: baskın kenar yönleri +24.8° ve −24.8° (klasik dimetrik).
 * matrix() ile ızgaranın x ekseni (cos24.8, sin24.8), y ekseni
 * (cos24.8, −sin24.8) yönüne oturtuluyor; böylece kareler konteynerin
 * tabanıyla aynı düzlemde duruyor ve ünite bir zemin üzerinde geziyormuş
 * gibi okunuyor.
 *
 * Dış kap pan/zoom matrisini JS'ten alır, iç düzlem izometrik matrisi
 * taşır — ikisi tek transform özelliğine sığmadığı için iki katman.
 */
.xc-fs-stage__grid {
  position: absolute; inset: 0;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

.xc-fs-stage__grid::before {
  content: '';
  position: absolute; inset: -200%;
  transform: matrix(.908, .419, .908, -.419, 0, 0);
  transform-origin: center center;
  background:
    linear-gradient(var(--xc-blueprint-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--xc-blueprint-grid) 1px, transparent 1px);
  background-size: 78px 78px, 78px 78px;
}

.xc-fs-stage {
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%, #000 9%, #000 91%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to right,  transparent 0%, #000 9%, #000 91%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
          mask-composite: intersect;
}

/* Tek görünüş varsa geçiş düğmesi boş kalır; yer kaplamasın. */
.xc-fs__viewtoggle:empty { display: none; }

/* Vana satırında durum metni koda ek olarak sağda durur. */
.xc-fs-eq__state { font: var(--xc-t-meta); opacity: .8; margin-left: var(--xc-2); }

/* Vana satırında ham sinyal değerleri */
.xc-fs-eq__raw {
  font: var(--xc-t-meta); opacity: .55; letter-spacing: .04em;
  margin-left: var(--xc-2); white-space: nowrap;
}
.xc-fs-eq__state.is-warn  { color: var(--xc-warn-mark); }
.xc-fs-eq__state.is-fault { color: var(--xc-fault-mark); }
.xc-fs-eq__state.is-ok    { color: var(--xc-ok-mark); }

.xc-fs__mute {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--xc-r-md);
  background: rgba(255, 255, 255, .08); color: var(--xc-on-blueprint);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.xc-fs__mute:hover { background: rgba(255, 255, 255, .18); }
.xc-fs__mute[aria-pressed="true"] { opacity: .55; }

/* ---- Tank seviye grafiği ----------------------------------------------------
   Analog ölçüm yok; grafik yüzde değil, hangi probun ıslak olduğunu gösterir.
   ---------------------------------------------------------------------------- */

.xc-tanks {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: var(--xc-2); align-items: end;
  padding: var(--xc-3) 0 0;
}

.xc-tank {
  display: grid; grid-template-columns: auto 1fr; gap: 4px;
  align-items: stretch; min-width: 0;
}

.xc-tank__body {
  position: relative;
  width: 100%; height: 128px;
  border-radius: var(--xc-r-sm);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  overflow: hidden;
}

.xc-tank__fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--xc-info-mark) 70%, transparent),
    var(--xc-info-mark));
  transition: height var(--xc-medium) var(--xc-ease);
}

/* Prob işareti: tankın içinde kendi yüksekliğinde ince bir çizgi. */
.xc-tank__probe {
  position: absolute; left: 2px; right: 2px; height: 3px;
  border-radius: 2px;
  background: var(--xc-idle-mark);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
.xc-tank__probe.is-ok    { background: var(--xc-on-blueprint); }
.xc-tank__probe.is-warn  { background: var(--xc-warn-mark); }
.xc-tank__probe.is-fault { background: var(--xc-fault-mark); height: 4px; }
.xc-tank__probe.is-nodata { background: transparent; box-shadow: 0 0 0 1px var(--xc-idle-mark); }

.xc-tank__none {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  font: var(--xc-t-meta); opacity: .45; padding: 0 4px;
}

/* Dik yazı: aşağıdan yukarı okunur, barın solunda durur. */
.xc-tank__name {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: var(--xc-t-meta); text-transform: uppercase; letter-spacing: .06em;
  opacity: .8; white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
}

/* Dip probu kuru: tank tabanında kırmızı bir çizgi. */
.xc-tank.is-low .xc-tank__body { border-color: var(--xc-fault-mark); }
.xc-tank.is-low .xc-tank__body::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--xc-fault-mark);
}
.xc-tank.is-high .xc-tank__body { border-color: var(--xc-warn-mark); }

/* Çelişkili samandıra: kenarlık kesik çizgi. */
.xc-tank.is-conflict .xc-tank__body { border-style: dashed; border-color: var(--xc-warn-mark); }

.xc-tank__warn {
  font: var(--xc-t-meta); color: var(--xc-warn-mark);
  margin: var(--xc-3) 0 0;
}

/* Göstergede teyitsiz çalışma: aynı yeşil, kesik halka. */
.xc-model-legend .xc-legend-dash {
  background: transparent;
  border: 2px dashed var(--xc-ok-mark);
}

/* ---- Filo listesi -----------------------------------------------------------
   Kart yerine satır: tesis sayısı arttıkça kartlar ekranı doldurup
   karşılaştırmayı zorlaştırıyordu. Aynı bilgi aynı sütunda hizalı durunca
   göz yukarıdan aşağıya tarayabiliyor.
   ---------------------------------------------------------------------------- */

.xc-fleet {
  display: block;
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-lg);
  background: var(--xc-surface);
  overflow: hidden;
}

.xc-frow {
  display: grid;
  grid-template-columns: 18px minmax(180px, 1.4fr) minmax(140px, 1.2fr) minmax(120px, 1fr) auto auto auto;
  align-items: center; gap: var(--xc-4);
  padding: var(--xc-4) var(--xc-5);
  border-top: 1px solid var(--xc-line);
  border-left: 3px solid transparent;
  text-decoration: none; color: inherit;
}
.xc-frow:first-child { border-top: 0; }
.xc-frow:hover { background: var(--xc-surface-sunken); }
.xc-frow.is-fault { border-left-color: var(--xc-fault-mark); }
.xc-frow.is-warn  { border-left-color: var(--xc-warn-mark); }
.xc-frow.is-ok    { border-left-color: var(--xc-ok-mark); }
.xc-frow.is-idle  { border-left-color: var(--xc-idle-mark); }

.xc-frow__main { display: grid; gap: 2px; min-width: 0; }
.xc-frow__name { font: var(--xc-t-body-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xc-frow__code { font: var(--xc-t-meta); color: var(--xc-text-faint); letter-spacing: .02em; }

.xc-frow__col { display: grid; gap: 2px; font: var(--xc-t-small); min-width: 0; }
.xc-frow__col small { font: var(--xc-t-meta); color: var(--xc-text-faint); }
.xc-frow__place, .xc-frow__spec { color: var(--xc-text-muted); overflow: hidden; }
.xc-frow__place { white-space: nowrap; text-overflow: ellipsis; }
.xc-frow__state { display: flex; align-items: center; gap: var(--xc-2); }
.xc-frow__units { text-align: right; white-space: nowrap; }
.xc-frow__link { justify-items: end; text-align: right; }

@media (max-width: 900px) {
  .xc-frow {
    grid-template-columns: 18px 1fr auto;
    grid-template-areas:
      'dot main state'
      '.   place link';
    gap: var(--xc-2) var(--xc-3);
  }
  .xc-frow__dot   { grid-area: dot; }
  .xc-frow__main  { grid-area: main; }
  .xc-frow__state { grid-area: state; }
  .xc-frow__place { grid-area: place; }
  .xc-frow__link  { grid-area: link; }
  .xc-frow__spec, .xc-frow__units { display: none; }
}

/* ---- Tesis künye formu ------------------------------------------------------ */

.xc-plantmeta__grid {
  display: grid; gap: var(--xc-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--xc-4);
}
.xc-plantmeta .xc-field { margin: 0; }

/* ---- Plant contacts ------------------------------------------------------- */
.xc-contacts .xc-card__head { align-items: flex-start; }
.xc-contacts .xc-card__head .xc-faint { margin: 4px 0 0; }
.xc-contact-list { display: grid; gap: var(--xc-3); }
.xc-contact-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: var(--xc-3);
  align-items: end;
  padding: var(--xc-3);
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
  background: var(--xc-surface-sunken);
}
.xc-contact-remove { min-width: 42px; height: 42px; padding: 0; font-size: 22px; line-height: 1; }
.xc-contact-actions { margin-top: var(--xc-4); }
.xc-contact-readonly { display: grid; gap: var(--xc-2); }
.xc-contact-readonly__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--xc-3);
  padding: var(--xc-3);
  border: 1px solid var(--xc-line);
  border-radius: var(--xc-r-md);
}
@media (max-width: 720px) {
  .xc-contact-row { grid-template-columns: 1fr; }
  .xc-contact-remove { width: 100%; }
  .xc-contact-readonly__row { align-items: flex-start; flex-direction: column; }
}

/* Xealio Connect v1.25.6 — compact map glass panel + fullscreen scene */
.xc-mapstage { min-height: 0; }
.xc-maplayout { grid-template-columns: minmax(0,1fr); }
.xc-maplayout__map #fleetMap { height: max(570px, 75vh); min-height: 0; }

/* The full screen element must contain BOTH #fleetMap and #mapPanel. */
.xc-mapstage.xc-map--fs,
.xc-mapstage:fullscreen,
.xc-mapstage:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  z-index: 9999;
  overflow: hidden;
  background: #04193f;
}
.xc-mapstage.xc-map--fs #fleetMap,
.xc-mapstage:fullscreen #fleetMap,
.xc-mapstage:-webkit-full-screen #fleetMap {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.xc-mapstage .xc-mapoverlay {
  width: min(300px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border-radius: 16px;
  border-color: rgba(151,195,255,.24);
  box-shadow: 0 10px 32px rgba(0,12,40,.30), inset 0 1px rgba(255,255,255,.10);
  background: linear-gradient(145deg, rgba(27,65,130,.63), rgba(24,55,117,.50));
  backdrop-filter: blur(21px) saturate(135%);
  -webkit-backdrop-filter: blur(21px) saturate(135%);
  overflow: hidden;
}
.xc-mapstage .xc-mapoverlay__head {
  padding: 7px 9px;
  min-height: 33px;
  gap: 6px;
  border-bottom-color: rgba(189,215,255,.10);
  touch-action: none;
}
.xc-mapstage .xc-mapoverlay__titlebox { gap: 7px; }
.xc-mapstage .xc-mapoverlay__grip {
  color: rgba(222,240,255,.52);
  font-size: 16px;
  line-height: 1;
  user-select: none;
}
.xc-mapstage .xc-mapoverlay__meta {
  color: rgba(230,242,255,.84);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
}
.xc-mapstage .xc-mapoverlay__actions { gap: 4px; }
.xc-mapstage .xc-mapoverlay__btn {
  width: 25px;
  height: 24px;
  border-radius: 5px;
  font-size: 12px;
}
.xc-mapstage .xc-mapoverlay__body {
  gap: 6px;
  padding: 0 8px 8px;
  min-height: 0;
}
.xc-mapstage .xc-mapoverlay__filters {
  gap: 5px;
  padding-top: 7px;
  padding-bottom: 1px;
}
.xc-mapstage .xc-mapoverlay .xc-chip {
  padding: 5px 7px;
  min-height: 25px;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 550;
  border-radius: 4px !important;
  letter-spacing: 0;
}
.xc-mapstage .xc-mapoverlay__list {
  max-height: min(330px, 47vh);
  min-height: 0;
  border-radius: 9px;
  background: rgba(12,39,87,.24);
  scrollbar-width: thin;
  scrollbar-color: rgba(193,222,255,.3) transparent;
}
.xc-mapstage .xc-mapoverlay .xc-maprow {
  grid-template-columns: 7px minmax(0,1fr) auto;
  gap: 7px;
  padding: 8px 9px;
  min-height: 46px;
  border-bottom-color: rgba(219,232,255,.09);
}
.xc-mapstage .xc-mapoverlay .xc-maprow__name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.18;
}
.xc-mapstage .xc-mapoverlay .xc-maprow__meta {
  font-size: 9px;
  line-height: 1.25;
  margin-top: 2px;
}
.xc-mapstage .xc-mapoverlay .xc-dot {
  width: 7px;
  height: 7px;
}
.xc-mapstage .xc-mapoverlay .xc-pill {
  border-radius: 5px;
  padding: 3px 5px;
  font-size: 9px;
  line-height: 1.15;
  white-space: nowrap;
}
.xc-mapstage .xc-mapoverlay__note {
  font-size: 9px;
  color: rgba(223,237,255,.66);
  line-height: 1.3;
  margin: 0;
}
.xc-mapstage .xc-mapoverlay__note:empty { display: none; }
.xc-mapstage .xc-mapoverlay-toggle {
  right: 12px;
  top: 12px;
  gap: 0;
  padding: 9px 12px;
  border-radius: 7px;
  min-height: 36px;
  font-size: 13px;
}
/* The WebGL fullscreen trigger remains in the common stage. */
.xc-mapstage > .xc-globe-fullscreen { z-index: 13; }

@media (min-width: 721px) {
  .xc-mapstage .xc-mapoverlay {
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
  }
}
@media (max-width: 720px) {
  .xc-maplayout__map #fleetMap { height: max(440px, 75dvh); }
  .xc-mapstage .xc-mapoverlay {
    top: auto;
    bottom: 10px;
    left: auto;
    right: 10px;
    width: min(296px, calc(100% - 20px));
    max-height: min(48%, 370px);
  }
  .xc-mapstage .xc-mapoverlay__list { max-height: 200px; }
  .xc-mapstage .xc-globe-fullscreen { bottom: 14px; left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .xc-mapstage .xc-mapoverlay,
  .xc-mapstage .xc-mapoverlay-toggle { transition: none; }
}

/* Xealio Connect 1.26.0 — Google-free CesiumJS globe alongside Digital Earth. */
.xc-mapstage > .xc-cesium-map {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #03112c;
}
.xc-mapstage > .xc-cesium-map[hidden],
.xc-mapstage > #fleetMap[hidden] { display: none !important; }
.xc-mapstage .xc-cesium-map .cesium-viewer,
.xc-mapstage .xc-cesium-map .cesium-widget,
.xc-mapstage .xc-cesium-map .cesium-widget canvas { width: 100%; height: 100%; }
.xc-mapstage .xc-cesium-map .cesium-viewer-bottom { bottom: 2px; left: 80px; right: 0; }
.xc-mapstage .xc-cesium-map .cesium-credit-logoContainer,
.xc-mapstage .xc-cesium-map .cesium-credit-textContainer { opacity: .82; }
.xc-map-engine-switch {
  position: absolute;
  z-index: 12;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(144,199,255,.30);
  border-radius: 10px;
  background: rgba(4,23,54,.76);
  color: #edf5ff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(1,9,25,.25);
}
.xc-map-engine-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 11px;
  background: transparent;
  color: #b9d5f3;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
.xc-map-engine-btn[aria-pressed="true"] {
  background: rgba(95,181,255,.23);
  border-color: rgba(135,201,255,.28);
  color: #fff;
}
.xc-map-engine-btn:focus-visible { outline: 2px solid #9bd9ff; outline-offset: 2px; }
.xc-map-engine-btn:disabled { opacity: .5; cursor: wait; }
.xc-map-engine-status {
  position: absolute;
  z-index: 13;
  left: 12px;
  top: 59px;
  max-width: min(390px,calc(100% - 24px));
  color: #e9f5ff;
  background: rgba(4,24,56,.88);
  border: 1px solid rgba(137,195,255,.35);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.xc-map-engine-status[hidden] { display: none !important; }
@media (max-width: 720px) {
  .xc-map-engine-switch { left: 8px; top: 8px; padding: 3px; }
  .xc-map-engine-btn { padding: 6px 8px; font-size: 10px; }
  .xc-map-engine-status { left: 8px; top: 54px; }
}

/* Keep canvas height while swapping the regular #fleetMap out of document flow. */
.xc-mapstage { min-height: max(570px, 75vh); }
@media (max-width: 720px) { .xc-mapstage { min-height: max(440px, 75dvh); } }
.xc-mapstage.xc-map--fs, .xc-mapstage:fullscreen, .xc-mapstage:-webkit-full-screen {
  min-height: 0 !important;
}

/* Real satellite source license: always show tile-provider attribution. */
.xc-mapstage .xc-cesium-map .cesium-viewer-bottom {
  left: 12px; bottom: 8px; right: 8px; z-index: 2;
}
.xc-mapstage .xc-cesium-map .cesium-credit-textContainer {
  font-size: 10px; opacity: 1;
}
.xc-mapstage .xc-cesium-map .cesium-credit-textContainer a { color: #e4f1ff; }
