/* PowerFusion Cloud — Bootstrap 5 tema + WebView/mobil */
:root {
  --pf-navy: #062b50;
  --pf-blue: #129bd8;
  --pf-cyan: #26bce5;
  --pf-green: #36a852;
  --pf-orange: #ff7921;
  --pf-yellow: #ffb625;
  --pf-text: #092b4d;
  --pf-muted: #71879b;
  --pf-line: #e5edf4;
  --pf-bg: #f4f8fb;
  --pf-sidebar: #062b50;
  --pf-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pf-safe-top: env(safe-area-inset-top, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
}

body.pf-body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--pf-text);
  background:
    radial-gradient(circle at 8% 0%, rgba(18, 155, 216, 0.08), transparent 28%),
    radial-gradient(circle at 92% 3%, rgba(255, 121, 33, 0.05), transparent 25%),
    var(--pf-bg);
  min-height: 100dvh;
  padding-bottom: var(--pf-safe-bottom);
}

body.pf-webview {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body.pf-webview input,
body.pf-webview textarea,
body.pf-webview select {
  user-select: text;
}

.pf-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pf-navy);
}

.pf-brand span {
  color: var(--pf-blue);
}

/* Login */
.pf-login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.25rem + var(--pf-safe-top)) 1rem calc(1.25rem + var(--pf-safe-bottom));
  background:
    linear-gradient(160deg, #062b50 0%, #0a3d6e 45%, #129bd8 100%);
}

.pf-login-card {
  width: 100%;
  max-width: 420px;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(6, 43, 80, 0.25);
  overflow: hidden;
}

.pf-login-card .card-header {
  background: #fff;
  border: 0;
  padding: 1.75rem 1.5rem 0.5rem;
  text-align: center;
}

.pf-login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pf-blue), var(--pf-cyan));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* App shell */
.pf-sidebar {
  width: 260px;
  background: var(--pf-sidebar);
  color: #fff;
  min-height: 100dvh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1040;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  padding-top: var(--pf-safe-top);
  overflow-y: auto;
}

.pf-sidebar.open {
  transform: translateX(0);
}

@media (min-width: 992px) {
  .pf-sidebar {
    transform: none;
  }
  .pf-main {
    margin-left: 260px;
  }
}

.pf-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.78);
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  margin: 0.15rem 0.75rem;
  font-size: 0.92rem;
}

.pf-sidebar .nav-link:hover,
.pf-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pf-sidebar .nav-link i {
  width: 1.25rem;
  margin-right: 0.4rem;
}

.pf-nav-group {
  margin: 0.15rem 0;
}
.pf-nav-group-btn {
  width: calc(100% - 1.5rem);
  margin: 0.15rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
  text-align: left;
}
.pf-nav-group-btn:hover,
.pf-nav-group-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pf-nav-group-btn i.bi:first-child {
  width: 1.25rem;
  margin-right: 0.4rem;
}
.pf-nav-chevron {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.pf-nav-group.open .pf-nav-chevron {
  transform: rotate(180deg);
}
.pf-nav-sub {
  display: none;
  padding: 0 0.35rem 0.35rem 0.5rem;
}
.pf-nav-group.open .pf-nav-sub {
  display: block;
}
.pf-nav-sub .nav-link {
  font-size: 0.86rem;
  padding: 0.45rem 0.85rem;
  margin: 0.1rem 0.5rem 0.1rem 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}
.pf-nav-sub .nav-link.active {
  color: #fff;
  background: rgba(18, 155, 216, 0.35);
}

/* Enerji & güç (Sunny Portal tarzı) */
.pf-en-top {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (max-width: 991px) {
  .pf-en-top { grid-template-columns: 1fr; }
}
.pf-en-gauge-card {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem 1rem;
}
.pf-en-gauge-title {
  font-size: 0.8rem;
  color: var(--pf-muted);
  font-weight: 600;
}
.pf-en-gauge-wrap { text-align: center; }
.pf-en-gauge-svg { width: 100%; max-width: 280px; height: auto; }
.pf-en-gauge-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pf-navy);
  margin-top: -0.5rem;
}
.pf-en-gauge-val small { font-size: 0.85rem; color: var(--pf-muted); font-weight: 600; }
.pf-en-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}
@media (max-width: 1199px) {
  .pf-en-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575px) {
  .pf-en-cards { grid-template-columns: repeat(2, 1fr); }
}
.pf-en-card {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.65rem;
  padding: 0.65rem 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-en-card:hover,
.pf-en-card.is-active {
  border-color: #129bd8;
  box-shadow: 0 0 0 1px rgba(18, 155, 216, 0.2);
}
.pf-en-card-label { font-size: 0.78rem; color: var(--pf-muted); font-weight: 600; }
.pf-en-card-sub { font-size: 0.68rem; color: #9aafc0; }
.pf-en-spark { width: 100%; display: block; margin: 0.35rem 0; }
.pf-en-card-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pf-navy);
}
.pf-en-tabs {
  display: flex;
  gap: 0.15rem;
  border-bottom: 1px solid var(--pf-line);
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.pf-en-tab {
  border: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  font-weight: 600;
  color: var(--pf-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.pf-en-tab.active {
  color: var(--pf-navy);
  border-bottom-color: #129bd8;
}
.pf-en-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}
.pf-en-thumb {
  flex: 0 0 auto;
  width: 64px;
  border: 1px solid var(--pf-line);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.35rem;
  text-align: center;
}
.pf-en-thumb.selected {
  border-color: #129bd8;
  box-shadow: 0 0 0 1px #129bd8;
}
.pf-en-thumb canvas { width: 100%; display: block; }
.pf-en-thumb span { font-size: 0.72rem; color: var(--pf-muted); }
.pf-en-datebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.pf-en-date-nav { display: flex; align-items: center; gap: 0.35rem; }
.pf-en-date-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--pf-line);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.25rem 0.55rem;
}
.pf-en-date-box input {
  border: 0;
  outline: none;
  font-size: 0.9rem;
  color: var(--pf-navy);
  font-weight: 600;
  background: transparent;
}
.pf-en-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.pf-en-range input[type="date"] {
  border: 1px solid var(--pf-line);
  border-radius: 0.4rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
}
.pf-en-total-pill {
  margin-left: auto;
  background: rgba(18, 155, 216, 0.1);
  color: var(--pf-navy);
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
}
.pf-en-details {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.65rem;
  padding: 0.65rem 1rem;
}
.pf-en-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--pf-navy);
  list-style: none;
}
.pf-en-details summary::-webkit-details-marker { display: none; }
.pf-en-details summary::after {
  content: "▾";
  float: right;
  color: var(--pf-muted);
}

.pf-topbar {
  background: #fff;
  border-bottom: 1px solid var(--pf-line);
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + var(--pf-safe-top));
  position: sticky;
  top: 0;
  z-index: 1020;
}

.pf-main {
  min-height: 100dvh;
}

.pf-content {
  padding: 1rem;
}

@media (min-width: 768px) {
  .pf-content {
    padding: 1.5rem;
  }
}

/* KPI cards — interactive surface */
.pf-kpi {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pf-kpi:hover {
  border-color: rgba(18, 155, 216, 0.35);
  box-shadow: 0 8px 24px rgba(6, 43, 80, 0.06);
}

.pf-kpi .label {
  color: var(--pf-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pf-kpi .value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--pf-navy);
  line-height: 1.2;
  margin-top: 0.25rem;
}

.pf-kpi .hint {
  font-size: 0.8rem;
  color: var(--pf-muted);
  margin-top: 0.2rem;
}

.pf-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.pf-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pf-status-online { color: var(--pf-green); background: rgba(54, 168, 82, 0.12); }
.pf-status-offline { color: #c0392b; background: rgba(192, 57, 43, 0.1); }
.pf-status-alarm { color: var(--pf-orange); background: rgba(255, 121, 33, 0.12); }
.pf-status-normal { color: var(--pf-blue); background: rgba(18, 155, 216, 0.12); }

.pf-panel {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.85rem;
  overflow: hidden;
}

.pf-panel-header {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--pf-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pf-panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--pf-navy);
}

.pf-table {
  margin: 0;
  font-size: 0.9rem;
}

.pf-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pf-muted);
  font-weight: 600;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.pf-table td {
  vertical-align: middle;
}

.pf-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 43, 80, 0.45);
  z-index: 1035;
}

.pf-overlay.show {
  display: block;
}

/* Mobil alt navigasyon — WebView hazır */
.pf-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: #fff;
  border-top: 1px solid var(--pf-line);
  padding: 0.35rem 0.25rem calc(0.35rem + var(--pf-safe-bottom));
}

@media (max-width: 991.98px) {
  .pf-bottom-nav {
    display: flex;
    justify-content: space-around;
  }
  .pf-content {
    padding-bottom: calc(4.5rem + var(--pf-safe-bottom));
  }
}

.pf-bottom-nav a {
  flex: 1;
  text-align: center;
  color: var(--pf-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35rem 0.15rem;
}

.pf-bottom-nav a.active,
.pf-bottom-nav a:hover {
  color: var(--pf-blue);
}

.pf-bottom-nav i {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.1rem;
}

.btn-pf {
  background: var(--pf-blue);
  border-color: var(--pf-blue);
  color: #fff;
  font-weight: 600;
}

.btn-pf:hover {
  background: #0e86bc;
  border-color: #0e86bc;
  color: #fff;
}

.pf-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--pf-muted);
}

.pf-company-logo {
  max-height: 36px;
  max-width: 140px;
  object-fit: contain;
}

.pf-plant-select .form-select {
  border-color: var(--pf-line);
  font-weight: 600;
  color: var(--pf-navy);
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .pf-plant-select {
    width: 100%;
  }
  .pf-plant-select .form-select {
    width: 100%;
    min-width: 0 !important;
  }
}

/* Araba göstergesi — aktif üretim */
.pf-gauge-panel {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(18, 155, 216, 0.12), transparent 55%),
    linear-gradient(180deg, #fbfcfe 0%, #fff 60%);
  overflow: hidden;
}

.pf-gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.1rem 0;
}

.pf-gauge-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--pf-navy);
}

.pf-gauge-cap {
  font-size: 0.78rem;
  color: var(--pf-muted);
  font-weight: 600;
}

.pf-gauge-live-pill {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1faa5a;
  background: rgba(31, 170, 90, 0.12);
  border: 1px solid rgba(31, 170, 90, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.pf-gauge {
  position: relative;
  padding: 0 0.5rem 0.85rem;
  text-align: center;
}

.pf-gauge-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.pf-gauge-progress {
  transition: stroke-dashoffset 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-gauge-needle {
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-gauge-tick-lab {
  font-size: 9px;
  fill: #71879b;
  font-weight: 700;
}

.pf-gauge-readout {
  margin-top: -1.6rem;
  position: relative;
  z-index: 2;
}

.pf-gauge-value {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--pf-navy);
  letter-spacing: -0.03em;
  line-height: 1;
}

.pf-gauge-value small {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pf-muted);
}

.pf-gauge-sub {
  font-size: 0.78rem;
  color: var(--pf-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.pf-gauge-scale {
  display: flex;
  justify-content: space-between;
  max-width: 280px;
  margin: 0.65rem auto 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--pf-navy);
  opacity: 0.7;
}

/* Yeşil enerji */
.pf-green-panel {
  background:
    linear-gradient(135deg, rgba(54, 168, 82, 0.06), rgba(18, 155, 216, 0.04)),
    #fff;
  border: 1px solid rgba(54, 168, 82, 0.15);
}

.pf-green-kpi {
  text-align: center;
  padding: 0.5rem 0.25rem;
}

.pf-green-kpi .icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(54, 168, 82, 0.12);
  color: var(--pf-green);
  font-size: 1.1rem;
}

.pf-green-kpi .val {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--pf-navy);
  line-height: 1.2;
}

.pf-green-kpi .lbl {
  font-size: 0.7rem;
  color: var(--pf-muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

/* Pro Analiz — Sunny Portal tarzı */
.pf-pro-page {
  margin: -0.25rem;
}

.pf-pro-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  min-height: calc(100dvh - 8rem);
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.75rem;
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .pf-pro-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

.pf-pro-sidebar {
  background: #f7fafc;
  border-right: 1px solid var(--pf-line);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 8rem);
}

@media (max-width: 991.98px) {
  .pf-pro-sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--pf-line);
  }
}

.pf-pro-side-head {
  padding: 0.9rem 1rem 0.5rem;
}

.pf-pro-plant-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pf-navy);
  padding: 0.4rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pf-pro-device-list {
  flex: 1;
  overflow: auto;
  max-height: 52vh;
}

.pf-pro-device {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  cursor: pointer;
  margin: 0 0.35rem 0.15rem;
  border: 1px solid transparent;
}

.pf-pro-device:hover {
  background: rgba(18, 155, 216, 0.06);
}

.pf-pro-device.is-on {
  background: rgba(18, 155, 216, 0.12);
  border-color: rgba(18, 155, 216, 0.28);
}

.pf-pro-device input {
  margin-top: 0.25rem;
}

.pf-pro-dev-ico {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #e8f4fb;
  color: var(--pf-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.pf-pro-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.pf-pro-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--pf-line);
  padding: 0 0.75rem;
}

.pf-pro-tab {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pf-muted);
  border-bottom: 2px solid transparent;
}

.pf-pro-tab.is-active {
  color: var(--pf-navy);
  border-bottom-color: var(--pf-blue);
}

.pf-pro-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pf-line);
  background: #fbfcfe;
}

.pf-pro-metric {
  width: 58px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid #d9e4ee;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #5d7388;
  transition: 0.15s ease;
}

.pf-pro-metric .sym {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

.pf-pro-metric .lab {
  font-size: 0.62rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.pf-pro-metric:hover {
  border-color: var(--pf-blue);
  color: var(--pf-navy);
}

.pf-pro-metric.is-active {
  background: var(--pf-blue);
  border-color: var(--pf-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 155, 216, 0.35);
}

.pf-pro-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.pf-pro-range {
  display: inline-flex;
  border: 1px solid var(--pf-line);
  border-radius: 0.5rem;
  overflow: hidden;
}

.pf-pro-range-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pf-muted);
  text-decoration: none;
  background: #fff;
}

.pf-pro-range-btn.is-active {
  background: #e8f4fb;
  color: var(--pf-navy);
}

.pf-pro-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pf-pro-chart-wrap {
  flex: 1;
  padding: 0 1rem 1rem;
  min-height: 360px;
}

.pf-pro-chart-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.pf-pro-chart-box {
  height: min(52vh, 480px);
  min-height: 320px;
  position: relative;
  border: 1px solid var(--pf-line);
  border-radius: 0.65rem;
  padding: 0.75rem;
  background:
    linear-gradient(180deg, #fafcfe 0%, #fff 40%);
}

.pf-kpi-action .value {
  color: var(--pf-navy);
}

/* Sunny Portal tarzı dashboard grid */
.pf-dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}

.pf-card {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.65rem;
  box-shadow: 0 1px 2px rgba(6, 43, 80, 0.04);
  padding: 0.85rem 1rem;
  min-width: 0;
}

.pf-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pf-navy);
  margin-bottom: 0.75rem;
}

.pf-card-info { grid-column: span 4; }
.pf-card-status { grid-column: span 4; }
.pf-card-weather { grid-column: span 4; }
.pf-card-energy { grid-column: span 9; grid-row: span 2; }
.pf-card-pr { grid-column: span 3; }
.pf-card-co2 { grid-column: span 3; }
.pf-card-grid { grid-column: span 6; }
.pf-card-alarms { grid-column: span 3; }
.pf-card-sensors { grid-column: span 9; }
.pf-sensor-card { grid-column: span 3; }

@media (max-width: 1199.98px) {
  .pf-card-info,
  .pf-card-status,
  .pf-card-weather { grid-column: span 4; }
  .pf-card-energy { grid-column: span 12; grid-row: auto; }
  .pf-card-pr,
  .pf-card-co2 { grid-column: span 6; }
  .pf-card-grid { grid-column: span 12; }
  .pf-card-alarms { grid-column: span 4; }
  .pf-card-sensors { grid-column: span 12; }
  .pf-sensor-card { grid-column: span 6; }
}

@media (max-width: 767.98px) {
  .pf-card-info,
  .pf-card-status,
  .pf-card-weather,
  .pf-card-energy,
  .pf-card-pr,
  .pf-card-co2,
  .pf-card-grid,
  .pf-card-alarms,
  .pf-card-sensors,
  .pf-sensor-card { grid-column: span 12; }
}

/* Hava şartları */
.pf-wx-now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pf-wx-temp {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--pf-navy);
  line-height: 1;
}
.pf-wx-ico {
  font-size: 2.4rem;
  color: #f0a020;
}
.pf-wx-label {
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--pf-navy);
}
.pf-wx-day {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--pf-navy);
}
.pf-wx-day i { color: #f0a020; }

/* Şebeke hizmetleri */
.pf-grid-svc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 575.98px) {
  .pf-grid-svc { grid-template-columns: 1fr; }
}
.pf-grid-svc-item .lab {
  font-size: 0.78rem;
  color: var(--pf-muted);
  font-weight: 600;
}
.pf-grid-svc-item .val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pf-navy);
  margin: 0.25rem 0 0.5rem;
}
.pf-grid-svc-item canvas {
  width: 100% !important;
  max-height: 56px;
}

/* Sensör kartları */
.pf-sensor-card {
  text-align: left;
  min-height: 120px;
}
.pf-sensor-ico {
  font-size: 1.35rem;
  color: var(--pf-blue);
  margin-bottom: 0.35rem;
}
.pf-sensor-card .lab {
  font-size: 0.78rem;
  color: var(--pf-muted);
  font-weight: 600;
}
.pf-sensor-card .val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pf-navy);
}
.pf-sensor-card .val small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pf-muted);
}
.pf-sensor-card .ago {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--pf-muted);
}

.pf-info-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0.25rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.6rem;
  color: #fff;
  background: linear-gradient(145deg, #0a3d6e, #129bd8);
  letter-spacing: 0.02em;
}

.pf-info-rows {
  display: grid;
  gap: 0.65rem;
}

.pf-info-rows .k {
  font-size: 0.72rem;
  color: var(--pf-muted);
  font-weight: 600;
}

.pf-info-rows .v {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pf-navy);
  line-height: 1.15;
}

.pf-info-rows .v span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pf-muted);
}

.pf-status-list {
  max-height: 220px;
  overflow: auto;
}

.pf-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f4f8;
}

.pf-status-row .ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}

.pf-status-row .ico.ok { background: #36a852; }
.pf-status-row .ico.bad { background: #e74c3c; }
.pf-status-row .ico.off { background: #9aa8b5; }

.pf-status-row .name {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--pf-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-status-row .pwr {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pf-muted);
}

.pf-card-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--pf-blue);
}

.pf-energy-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

@media (max-width: 575.98px) {
  .pf-energy-layout {
    grid-template-columns: 1fr;
  }
}

.pf-gauge.compact .pf-gauge-svg {
  max-width: 220px;
}

.pf-gauge-readout.compact {
  margin-top: -1.2rem;
}

.pf-gauge-readout.compact .pf-gauge-value {
  font-size: 1.55rem;
}

.pf-gauge-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pf-blue);
  margin-top: 0.15rem;
}

.pf-gauge-dev .pf-gauge-svg {
  max-width: 280px;
}

.pf-energy-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  min-height: 160px;
}

@media (max-width: 575.98px) {
  .pf-energy-charts {
    grid-template-columns: 1fr;
  }
}

.pf-mini-chart {
  border: 1px solid #eef3f7;
  border-radius: 0.5rem;
  padding: 0.45rem 0.5rem 0.35rem;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.pf-mini-chart .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.pf-mini-chart .head span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pf-muted);
}

.pf-mini-chart .head strong {
  font-size: 0.82rem;
  color: var(--pf-navy);
}

.pf-mini-chart canvas {
  flex: 1;
  width: 100% !important;
  max-height: 100px;
}

.pf-chart-empty {
  font-size: 0.72rem;
  color: var(--pf-muted);
  text-align: center;
  padding: 1.5rem 0;
}

.pf-pr-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pf-pr-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pf-pr-item .mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.pf-pr-item .mark.ok { background: #36a852; }
.pf-pr-item .mark.warn { background: #e74c3c; }

.pf-pr-item .num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pf-navy);
  line-height: 1;
}

.pf-pr-item .lab {
  font-size: 0.72rem;
  color: var(--pf-muted);
  font-weight: 600;
}

.pf-co2-body {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.pf-co2-body .leaf {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(54, 168, 82, 0.12);
  color: #36a852;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.pf-co2-body .big {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pf-navy);
}

.pf-co2-body .lab,
.pf-co2-body .tot {
  font-size: 0.8rem;
  font-weight: 600;
}

.pf-alarm-mini {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f4f8;
}

.pf-sensor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (max-width: 575.98px) {
  .pf-sensor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pf-sensor {
  text-align: center;
  padding: 0.65rem 0.35rem;
  border: 1px solid #eef3f7;
  border-radius: 0.5rem;
  background: #fbfcfe;
}

.pf-sensor i {
  font-size: 1.25rem;
  color: var(--pf-blue);
}

.pf-sensor .lab {
  font-size: 0.7rem;
  color: var(--pf-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}

.pf-sensor .val {
  font-weight: 800;
  color: var(--pf-navy);
  font-size: 0.95rem;
}

.pf-sensor .val small {
  font-weight: 600;
  color: var(--pf-muted);
  font-size: 0.7rem;
}

/* Durum listesi */
.pf-status-list-panel {
  padding: 0;
  overflow: hidden;
}

.pf-status-table {
  font-size: 0.88rem;
}

.pf-status-table thead th {
  background: #f7fafc;
  color: var(--pf-navy);
  font-weight: 700;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--pf-line);
  white-space: nowrap;
  vertical-align: bottom;
  padding: 0.75rem 0.65rem;
}

.pf-status-table tbody td {
  padding: 0.55rem 0.65rem;
  border-color: #eef3f7;
}

.pf-status-table tbody tr:hover {
  background: rgba(18, 155, 216, 0.04);
}

.pf-dot {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}

.pf-dot.ok { background: #36a852; }
.pf-dot.bad { background: #e74c3c; }
.pf-dot.off { background: #9aa8b5; }

.pf-dev-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.pf-dev-ico {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #eef3f7;
  color: #5d7388;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-cmp-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #5d7388;
  background: #f0f4f8;
  text-decoration: none;
}

.pf-cmp-btn:hover {
  background: #e8f4fb;
  color: var(--pf-blue);
}

.pf-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #36a852;
}

.pf-live-dot .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #36a852;
  box-shadow: 0 0 0 3px rgba(54, 168, 82, 0.2);
}

.pf-inv-photo {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #e8eef4, #f7fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--pf-navy);
}

.pf-dev-status-big {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0 0.75rem;
}

.pf-device-dash .pf-card-info { grid-column: span 3; }
.pf-device-dash .pf-card-status { grid-column: span 3; }
.pf-device-dash .pf-card-energy { grid-column: span 6; }
.pf-device-dash .pf-card-co2 { grid-column: span 3; }

/* Konfigürasyon kolonları */
.pf-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

@media (max-width: 767.98px) {
  .pf-config-grid {
    grid-template-columns: 1fr;
  }
}

.pf-config-col {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 0.65rem;
  overflow: hidden;
  min-height: 280px;
}

.pf-config-head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--pf-line);
  background: #f7fafc;
}

.pf-config-head i {
  font-size: 1.35rem;
  color: var(--pf-blue);
}

.pf-config-head .t {
  font-weight: 800;
  color: var(--pf-navy);
}

.pf-config-head .s {
  font-size: 0.75rem;
  color: var(--pf-muted);
  font-weight: 600;
}

.pf-config-link {
  display: block;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f0f4f8;
  text-decoration: none;
  color: var(--pf-navy);
  font-weight: 600;
  font-size: 0.9rem;
}

.pf-config-link:hover {
  background: rgba(18, 155, 216, 0.06);
  color: var(--pf-blue);
}

.pf-config-foot {
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: var(--pf-muted);
  font-weight: 600;
  margin-top: auto;
}

.pf-params-form .sticky-bottom {
  position: sticky;
  bottom: 0;
  z-index: 5;
}

/* Santral — kullanıcı ata */
.pf-user-pick {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 360px;
  overflow: auto;
  padding: 0.15rem;
}

.pf-user-pick-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e4ebf2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.pf-user-pick-item:hover {
  border-color: #b9d7ea;
  background: rgba(18, 155, 216, 0.04);
}

.pf-user-pick-item.on {
  border-color: var(--pf-blue, #129bd8);
  background: rgba(18, 155, 216, 0.08);
  box-shadow: 0 0 0 1px rgba(18, 155, 216, 0.25);
}

.pf-user-pick-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pf-user-pick-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pf-user-pick-body .n {
  font-weight: 700;
  color: var(--pf-navy, #062b50);
  font-size: 0.92rem;
}

.pf-user-pick-body .e {
  font-size: 0.78rem;
  color: var(--pf-muted, #6b7c8f);
}

.pf-user-pick-check {
  font-size: 1.1rem;
  color: transparent;
}

.pf-user-pick-item.on .pf-user-pick-check {
  color: var(--pf-blue, #129bd8);
}

