/**
 * Makro Panel — Uygulama kabuğu (sidebar + main)
 * Tailwind bağımlılığı olmadan sabit layout
 */

:root {
  --sidebar-width: 17.5rem;
}

body.page-bg {
  margin: 0;
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── Sidebar (sol üst köşeye yapışık) ─── */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  width: var(--sidebar-width, 17.5rem);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #fff;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
}

.app-sidebar.is-open {
  transform: translateX(0);
}

.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.app-sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-sidebar-brand img {
  height: 2.25rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}

.app-sidebar-brand-badge {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.app-sidebar-tagline {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.5rem;
}

.app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-sidebar-nav .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.app-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.app-sidebar-footer .user-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidebar-footer__hint {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

/* ─── Main content ─── */
.app-main {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  box-sizing: border-box;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-main-inner {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

/* ─── Panel üst header ─── */
.app-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 3.5rem;
  padding: 0 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-panel-header__left,
.app-panel-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.app-panel-header__right {
  flex-shrink: 0;
}

.app-panel-header__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-panel-header__user {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  max-width: 12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .app-panel-header__user {
    display: none;
  }
}

.app-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  color: var(--brand-primary, #1f4999);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.app-menu-btn:hover {
  background: #fff;
  border-color: rgba(31, 73, 153, 0.35);
}

.app-menu-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.app-menu-btn__icon-close {
  display: none;
}

.app-shell.sidebar-visible .app-menu-btn__icon-open {
  display: none;
}

.app-shell.sidebar-visible .app-menu-btn__icon-close {
  display: block;
}

.app-panel-header__logout {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #b91c1c;
  text-decoration: none;
  background: rgba(254, 226, 226, 0.65);
  border: 1px solid rgba(248, 113, 113, 0.35);
  transition: background 0.15s, color 0.15s;
}

.app-panel-header__logout:hover {
  background: #fee2e2;
  color: #991b1b;
}

.app-panel-header__logout svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Masaüstü: sidebar açıkken main kaydır */
@media (min-width: 1024px) {
  .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar-backdrop {
    display: none !important;
  }

  .app-shell:not(.sidebar-collapsed) .app-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
  }

  .app-shell.sidebar-collapsed .app-main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .app-shell.sidebar-collapsed .app-sidebar {
    transform: translateX(-100%);
  }

  .app-main-inner {
    padding: 1.5rem 2rem;
  }
}

@media (min-width: 1280px) {
  .app-main-inner {
    padding: 2rem 2.5rem;
  }
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.page-header p {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .page-header h1 {
    font-size: 1.875rem;
  }
}

/* Info banner — compact */
.info-banner {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 73, 153, 0.12);
  border-left: 4px solid var(--brand-primary);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
}

.info-banner strong {
  display: block;
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.info-banner.is-collapsible summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--brand-primary);
}

.info-banner.is-collapsible summary::-webkit-details-marker {
  display: none;
}

.info-banner.is-collapsible[open] summary {
  margin-bottom: 0.5rem;
}

.info-banner p {
  margin: 0;
}

/* Help bubble — tıklanınca açılan baloncuk açıklama */
.help-bubble {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
}

.help-bubble__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: rgba(31, 73, 153, 0.1);
  color: var(--brand-primary);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.help-bubble__trigger:hover,
.help-bubble.is-open .help-bubble__trigger {
  background: rgba(31, 73, 153, 0.18);
  transform: scale(1.05);
}

.help-bubble__trigger:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.help-bubble__popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(17.5rem, calc(100vw - 2rem));
  padding: 0.75rem 0.875rem;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(31, 73, 153, 0.14);
  box-shadow: 0 10px 28px rgba(31, 73, 153, 0.14);
  font-size: 0.75rem;
  line-height: 1.5;
  color: #475569;
  text-align: left;
}

.help-bubble__popover::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 0.5rem;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: 1px solid rgba(31, 73, 153, 0.14);
  border-top: 1px solid rgba(31, 73, 153, 0.14);
  transform: rotate(45deg);
}

.help-bubble__title {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
  margin-bottom: 0.35rem;
}

.help-bubble__text {
  display: block;
}

.stat-label-row,
.card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.stat-label-row > .stat-label,
.stat-label-row > p,
.card-label-row > p {
  flex: 1;
  min-width: 0;
}

.chart-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.chart-title-row .chart-title {
  flex: 1;
  min-width: 0;
}

/* Dashboard drill-down kartları */
.dashboard-drill-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-drill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(31, 73, 153, 0.12);
}

.dashboard-drill-card:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Sidebar (z-50) üstünde tam ekran modal */
.dashboard-drill-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 200 !important;
  width: 100vw;
  max-width: 100vw;
}

.dashboard-drill-modal.is-open {
  display: block !important;
}

.dashboard-drill-modal[data-drill-level="2"] {
  z-index: 210 !important;
}

.dashboard-drill-body {
  padding: 0 1.25rem 1.25rem;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.dashboard-drill-table tbody tr.dashboard-drill-row:hover {
  background: rgba(255, 255, 255, 0.55);
}

.upcoming-payment-row,
.dashboard-invoice-row {
  cursor: pointer;
}

.upcoming-payment-row td,
.dashboard-invoice-row td {
  cursor: pointer;
}

.upcoming-payment-row:hover,
.dashboard-invoice-row:hover {
  background: rgba(255, 255, 255, 0.5);
}

@keyframes upcomingPaymentOverduePulse {
  0%, 100% {
    background-color: rgba(254, 226, 226, 0.72);
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.55);
  }
  50% {
    background-color: rgba(254, 202, 202, 0.92);
    box-shadow: inset 3px 0 0 rgba(220, 38, 38, 0.95);
  }
}

@keyframes upcomingPaymentUrgentPulse {
  0%, 100% {
    background-color: rgba(255, 237, 213, 0.65);
    box-shadow: inset 3px 0 0 rgba(249, 115, 22, 0.5);
  }
  50% {
    background-color: rgba(254, 215, 170, 0.88);
    box-shadow: inset 3px 0 0 rgba(234, 88, 12, 0.9);
  }
}

.upcoming-payment-row--overdue,
.dashboard-invoice-row--overdue {
  animation: upcomingPaymentOverduePulse 1.8s ease-in-out infinite;
}

.upcoming-payment-row--overdue:hover,
.dashboard-invoice-row--overdue:hover {
  background: rgba(254, 202, 202, 0.95);
}

.upcoming-payment-row--urgent,
.dashboard-invoice-row--urgent {
  animation: upcomingPaymentUrgentPulse 2.2s ease-in-out infinite;
}

.upcoming-payment-row--urgent:hover,
.dashboard-invoice-row--urgent:hover {
  background: rgba(254, 215, 170, 0.92);
}

@media (prefers-reduced-motion: reduce) {
  .upcoming-payment-row--overdue,
  .upcoming-payment-row--urgent,
  .dashboard-invoice-row--overdue,
  .dashboard-invoice-row--urgent {
    animation: none;
  }

  .upcoming-payment-row--overdue,
  .dashboard-invoice-row--overdue {
    background-color: rgba(254, 226, 226, 0.85);
    box-shadow: inset 3px 0 0 #ef4444;
  }

  .upcoming-payment-row--urgent,
  .dashboard-invoice-row--urgent {
    background-color: rgba(255, 237, 213, 0.8);
    box-shadow: inset 3px 0 0 #f97316;
  }
}

.dashboard-drill-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-drill-tool-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.625rem;
  border: 1px solid rgba(31, 73, 153, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.dashboard-drill-tool-btn:hover {
  background: #fff;
}

.dashboard-drill-loading,
.dashboard-drill-empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.mt-1 { margin-top: 0.25rem; }

/* Stat cards grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

.stat-card-inner {
  padding: 1rem 1.125rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(232, 237, 247, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 20px rgba(31, 73, 153, 0.06);
  border-left-width: 4px;
  border-left-style: solid;
}

.stat-card-inner .stat-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.stat-card-inner .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.35rem;
  line-height: 1.2;
}

.stat-card-inner .stat-hint {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* Card modüllerinde kWh birimi — sayıdan daha küçük, hafif */
.kwh-unit {
  font-size: 0.62em;
  font-weight: 500;
  opacity: 0.72;
  letter-spacing: 0.02em;
}

.stat-card-inner .stat-value .kwh-unit {
  font-size: 0.58em;
}

.stat-card-inner .stat-hint .kwh-unit {
  font-size: 0.9em;
  opacity: 0.65;
}

.glass-card .kwh-unit,
.rounded-xl.bg-indigo-50 .kwh-unit,
.rounded-xl.bg-blue-50 .kwh-unit,
.rounded-xl.bg-emerald-50 .kwh-unit,
.rounded-xl.bg-violet-50 .kwh-unit,
.rounded-xl.bg-emerald-50\/80 .kwh-unit,
.rounded-xl.bg-violet-50\/80 .kwh-unit,
.rounded-xl.bg-blue-50\/80 .kwh-unit,
.rounded-xl.bg-amber-50\/80 .kwh-unit {
  font-size: 0.6em;
}

/* Net enerji dengesi: artı = yeşil, eksi = kırmızı */
.stat-card-inner--delta-plus {
  border-left-color: #10b981;
}

.stat-card-inner--delta-minus {
  border-left-color: #ef4444;
}

.stat-card-inner--delta-zero {
  border-left-color: #94a3b8;
}

.stat-card-inner--delta-plus .stat-value {
  color: #059669;
}

.stat-card-inner--delta-minus .stat-value {
  color: #dc2626;
}

.stat-card-inner--delta-zero .stat-value {
  color: #64748b;
}

@media (min-width: 640px) {
  .stat-card-inner .stat-value {
    font-size: 1.5rem;
  }
}

/* Charts — MacBook: üstte geniş ana grafik, altta 2 grafik (sıkışık 3 sütun yok) */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.charts-grid .chart-panel:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .charts-grid.charts-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .charts-grid.charts-grid-2 .chart-panel:first-child {
    grid-column: auto;
  }
}

/* 3 grafik: aylık tam genişlik + altta mahsup | tarife */
@media (min-width: 768px) {
  .charts-grid.charts-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .charts-grid.charts-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .charts-grid.charts-grid-3 .chart-panel:first-child {
    grid-column: auto;
  }
}

.charts-grid .chart-wide {
  grid-column: 1 / -1;
}

.chart-panel {
  padding: 1rem 1.125rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 20px rgba(31, 73, 153, 0.07);
  min-width: 0;
}

.chart-panel h2,
.chart-panel .chart-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.chart-panel .chart-sub {
  font-size: 0.6875rem;
  color: #64748b;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.chart-panel .chart-canvas {
  position: relative;
  height: 13rem;
  width: 100%;
}

/* Ana grafik (ilk panel) daha yüksek — çift eksen için alan */
.charts-grid .chart-panel:first-child .chart-canvas {
  height: 15.5rem;
}

@media (min-width: 768px) {
  .chart-panel .chart-canvas {
    height: 14rem;
  }
  .charts-grid .chart-panel:first-child .chart-canvas {
    height: 17rem;
  }
}

@media (min-width: 1400px) {
  .charts-grid.charts-grid-3 .chart-panel .chart-canvas {
    height: 14.5rem;
  }
  .charts-grid.charts-grid-3 .chart-panel:first-child .chart-canvas {
    height: 15rem;
  }
}

/* ─── Admin split layout (kullanıcılar, vb.) ─── */
.admin-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .admin-split {
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 1.5rem;
  }
}

.panel-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(31, 73, 153, 0.07);
  overflow: hidden;
}

.panel-card--accent {
  border-top: 3px solid var(--brand-primary);
}

.panel-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.6) 100%);
}

.panel-card__header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.panel-card__header p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.panel-card__body {
  padding: 1.25rem 1.375rem 1.375rem;
}

.panel-card__body--flush {
  padding: 0;
}

.panel-count {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(31, 73, 153, 0.08);
  border: 1px solid rgba(31, 73, 153, 0.12);
  white-space: nowrap;
}

.panel-count--sm {
  font-size: 0.625rem;
  padding: 0.15rem 0.5rem;
}

/* Tesis ↔ EDAŞ eşleştirme modal */
.plant-map-modal-body {
  max-height: min(72vh, 34rem);
  overflow-y: auto;
}

.plant-map-list-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.plant-map-list-section h4 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
}

.plant-map-list-empty {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  background: rgba(248, 250, 252, 0.95);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  font-size: 0.8125rem;
  color: #64748b;
}

.plant-map-list-empty.hidden {
  display: none;
}

.plant-map-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  max-height: 11rem;
  overflow-y: auto;
}

.plant-map-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.plant-map-list__info strong {
  display: block;
  font-size: 0.8125rem;
  color: #0f172a;
  line-height: 1.35;
}

.plant-map-list__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.4;
}

.plant-map-list__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.plant-map-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.plant-map-divider::before,
.plant-map-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.35);
}

.plant-map-add-form .glass-modal-form__footer,
.plant-map-form-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

/* Data table */
.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: rgba(248, 250, 252, 0.95);
}

.data-table th {
  padding: 0.75rem 1.25rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.data-table th.text-right,
.data-table td.text-right {
  text-align: right;
}

.data-table .hide-until-sm,
.data-table .hide-until-md,
.data-table .hide-until-lg {
  display: none;
}

@media (min-width: 640px) {
  .data-table .hide-until-sm {
    display: table-cell;
  }
}

@media (min-width: 768px) {
  .data-table .hide-until-md {
    display: table-cell;
  }
}

@media (min-width: 1024px) {
  .data-table .hide-until-lg {
    display: table-cell;
  }
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(31, 73, 153, 0.03);
}

.data-table td {
  padding: 0.875rem 1.25rem;
  color: #334155;
  vertical-align: middle;
}

.data-table td strong,
.data-table .cell-name {
  font-weight: 600;
  color: #0f172a;
}

.data-table .cell-muted {
  font-size: 0.8125rem;
  color: #64748b;
}

/* User row with avatar */
.user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary, #485ea8));
  box-shadow: 0 2px 8px rgba(31, 73, 153, 0.2);
}

.user-avatar--muted {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
}

.badge-brand {
  color: var(--brand-primary);
  background: rgba(31, 73, 153, 0.1);
  border: 1px solid rgba(31, 73, 153, 0.15);
}

.badge-success {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-neutral {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.status-dot--active {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.status-dot--inactive {
  background: #94a3b8;
}

.status-dot--warning {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.plant-facility-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.consumption-point-icon {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

/* Action buttons in table */
.btn-icon-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-icon-secondary:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

.btn-icon-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-icon-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-icon-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0d9488;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-icon-view:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: rgba(13, 148, 136, 0.22);
  color: #0f766e;
}

.btn-icon-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn-icon-brand:hover {
  background: rgba(31, 73, 153, 0.08);
  border-color: rgba(31, 73, 153, 0.2);
}

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.panel-card__footer-link {
  display: block;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.panel-card__footer-link:hover {
  text-decoration: underline;
}

.admin-split > .panel-card.panel-card--scroll {
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

.admin-page-section {
  margin-top: 1.75rem;
}

/* ─── Glass page surfaces (dağıtım, vb.) ─── */
.glass-surface {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(31, 73, 153, 0.08);
  overflow: hidden;
}

@supports (backdrop-filter: blur(16px)) {
  .glass-surface {
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.glass-surface__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 250, 252, 0.45) 100%);
}

.glass-surface__header h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
}

.glass-surface__header p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.glass-surface__body--flush {
  padding: 0;
}

.dist-company-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dist-company-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary, #485ea8));
  box-shadow: 0 4px 12px rgba(31, 73, 153, 0.22);
}

/* Primary CTA (sayfa araç çubuğu) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary, #485ea8));
  box-shadow: 0 4px 16px rgba(31, 73, 153, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(31, 73, 153, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  filter: brightness(1.03);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.22);
}

.page-toolbar__actions .btn-secondary {
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  white-space: nowrap;
}

.form-card-actions {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.form-card-actions .btn-brand {
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.table-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

.table-empty svg {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.75rem;
  opacity: 0.4;
}
