/* =========================
   GES DASHBOARD
========================= */

.ges-dashboard{
  font-family:'Open Sans',sans-serif;
  /* dış boşluğu tema yönetsin */
  padding:0;
  margin:0;
}

/* =========================
   TOP GRID
========================= */

.ges-top-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:20px 20px;
  width: 100%;
  
  margin-bottom:12px;
}

/* =========================
   BOXES
========================= */

.ges-statistics-box,
.ges-environment-box{
  background:#ffffff;
  border:1px solid #eef2f7;
  border-radius:16px;

  padding:10px;

  box-shadow:0 8px 24px rgba(0,0,0,0.06);
}

/* =========================
   SECTION TITLE
========================= */

.ges-section-title{
  font-size:20px;
  font-weight:700;
  color:#0b2d5c;

  margin-bottom:14px;
  padding:4px;
}

/* =========================
   STATISTICS
========================= */

.ges-stats-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.ges-stat-card{
  display:flex;
  align-items:center;
  gap:10px;

  background:#e9ecf0;
  border-radius:12px;

  padding:9px;
}

.ges-stat-icon{
  font-size:30px;
}

.ges-stat-value{
  font-size:20px;
  font-weight:700;
  color:#0b2d5c;
  line-height:1.2;
}

.ges-stat-label{
  font-size:12px;
  color:#666;
}

/* =========================
   ENVIRONMENT
========================= */

.ges-environment-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
}

.ges-env-card{
  background:#e9ecf0;
  border-radius:12px;

  padding:6px;

  text-align:center;
}

.ges-env-title{
  font-size:12px;
  color:#555;

  margin-bottom:8px;
}

.ges-env-value{
  font-size:20px;
  font-weight:700;
  color:#0b2d5c;

  margin-bottom:8px;
}

.ges-env-image{
  font-size:38px;
}

/* =========================
   INVERTER GRID
========================= */

.ges-inverter-grid{
  display:grid;
  flex: 1;
  width:100%;
  max-width:100%;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:12px 20px;
}

/* =========================
   CARD
========================= */

.ges-card{
  background:#ffffff;

  border:1px solid #eef2f7;
  border-radius:16px;

  overflow:hidden;

  padding:0;

  transition:0.3s;

  box-shadow:0 8px 24px rgba(0,0,0,0.06);
}

.ges-card:hover{
  transform:translateY(-3px);

  box-shadow:0 0 20px rgba(0,150,255,0.25);
}

.ges-card-header{
  background:#0b2d5c; 
  color:#fff;

  padding:14px 16px;

  display:flex;
  justify-content:space-between;
  align-items:center;

  border-radius:14px 14px 0 0;
}

.ges-card-title{
  font-size:15px;
  font-weight:700;
}

.ges-status-icon{
  font-size:18px;
}

.ges-card-body{
  padding:12px;
}

.ges-field{
  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:10px 2px;

  border-bottom:1px solid #eee;
}

.ges-field strong{
  color:#444;
  font-size:14px;
}

.ges-value{
  color:#111;
  font-weight:600;
}

/* =========================
   CARD FOOTER
========================= */

.ges-card-footer{
  display:flex;
  justify-content:flex-end;

  margin-top:14px;
}

/* =========================
   DETAIL BUTTON
========================= */

.ges-detail-btn{
  border:none;

  background:#e9ecf0;
  color:#0b2d5c;

  padding:6px 10px;

  border-radius:10px;

  font-size:13px;
  font-weight:600;

  cursor:pointer;

  transition:0.25s;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}

.ges-detail-btn:hover{
  background:#14458c;
  color:#fff;

  transform:translateY(-2px);

  box-shadow:0 6px 16px rgba(11,45,92,0.25);
}


.ges-modal{
  position:fixed;
  inset:0;
  z-index:99999;

  display:none;
  align-items:center;
  justify-content:center;

  padding:20px;

  background:rgba(15,23,42,0.72);

  backdrop-filter:blur(6px);

  /* DEĞİŞTİ */
  overflow-y:auto;
}

/* =========================
   MODAL BOX
========================= */

.ges-modal-content{
  width:min(1100px,95vw);

  /* DEĞİŞTİ */
  height:85vh;

  /* EKLENDİ */
  max-height:85vh;

  background:#ffffff;

  border-radius:24px;

  overflow:hidden;

  display:flex;
  flex-direction:column;

  position:relative;

  box-shadow:
    0 10px 40px rgba(0,0,0,0.25),
    0 2px 10px rgba(0,0,0,0.08);

  animation:gesModalShow .25s ease;
}

/* =========================
   HEADER
========================= */

.ges-modal-header{
  height:60px;

  background:
    linear-gradient(
      135deg,
      #0b2d5c 0%,
      #14458c 100%
    );

  color:#fff;

  padding:0 20px;

  display:flex;
  align-items:center;
  justify-content:space-between;

  flex-shrink:0;

  /* EKLENDİ */
  position:relative;
  z-index:2;
}

#ges-modal-title{
  font-size:20px;
  font-weight:700;
  letter-spacing:.3px;
}

/* =========================
   CLOSE BUTTON
========================= */

.ges-close{
  width:42px;
  height:42px;

  border-radius:12px;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;

  font-size:24px;
  font-weight:400;

  transition:.2s;
}

.ges-close:hover{
  background:rgba(255,255,255,0.14);
  transform:rotate(90deg);
}

/* =========================
   BODY
========================= */

.ges-modal-body{
  flex:1;

  /* DEĞİŞTİ */
  overflow-y:auto;
  overflow-x:hidden;

  padding:10px;

  background:#f4f7fb;

  display:grid;

   grid-template-columns:
    repeat(auto-fit,minmax(min(100%,320px),1fr));

  gap:16px;

  /* EKLENDİ */
  align-content:start;

  /* EKLENDİ */
  min-height:0;
}

/* =========================
   SCROLLBAR
========================= */

.ges-modal-body::-webkit-scrollbar{
  width:10px;
}

.ges-modal-body::-webkit-scrollbar-thumb{
  background:#c7d2e3;
  border-radius:20px;
}

/* =========================
   FIELD CARD
========================= */

.ges-modal-body .ges-field{
  background:#ffffff;

  border:1px solid #e7edf5;

  border-radius:18px;

  padding:10px 16px;

  display:flex;
  flex-direction:column;

  gap:8px;

  transition:.2s;

  box-shadow:0 4px 12px rgba(0,0,0,0.04);

  border-bottom:none;
}

.ges-modal-body .ges-field:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,0.08);
}

.ges-modal-body .ges-field strong{
  font-size:13px;
  font-weight:600;
  color:#6b7280;

  text-transform:uppercase;
  letter-spacing:.5px;
}

.ges-modal-body .ges-value{
  font-size:16px;
  font-weight:700;
  color:#111827;

  word-break:break-word;
}

/* =========================
   TABLE WRAPPER
========================= */

.ges-pv-wrapper,
.ges-ac-wrapper{
  grid-column:1/-1;

  background:#ffffff;

  border-radius:22px;

  padding:18px;

  border:1px solid #e8eef7;

  box-shadow:0 4px 14px rgba(0,0,0,0.04);
}

/* =========================
   TABLE TITLE
========================= */

.ges-pv-title{
  font-size:18px;
  font-weight:700;
  color:#0b2d5c;
  margin-bottom:18px;

}


/* =========================
   TABLE
========================= */

.ges-pv-table{
  width:100%;
  border-collapse:collapse;

  overflow:hidden;

  border-radius:14px;
}

.ges-pv-table thead{
  background:#0b2d5c;
  color:#fff;
 
}

.ges-pv-table th{
  padding:14px;
  font-size:13px;
  font-weight:600;
  text-align:center;   /* ortalama */
}

.ges-pv-table td{
  padding:14px;
  border-bottom:1px solid #edf2f7;

  text-align:center;

  font-size:14px;
}

.ges-pv-table tbody tr:hover{
  background:#f8fbff;
}

/* =========================
   AC GRID
========================= */

.ges-ac-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:10px;
}

.ges-ac-box{
  background:#f6f9fc;

  border-radius:16px;

  padding:14px;

  text-align:center;

  border:1px solid #e5edf7;
}

.ges-ac-box div{
  font-size:13px;
  color:#64748b;

  margin-bottom:8px;
}

.ges-ac-box strong{
  font-size:22px;
  color:#0f172a;
}

/* =========================
   FOOTER
========================= */

.ges-modal-footer{
  padding:12px 16px;

  background:#ffffff;

  border-top:1px solid #edf2f7;

  display:flex;
  justify-content:flex-end;

  flex-shrink:0;

  /* EKLENDİ */
  position:relative;
  z-index:2;
}

/* =========================
   MODAL BUTTON
========================= */

.ges-modal-footer .ges-detail-btn{
  border:none;

  background:#0b2d5c;
  color:#fff;

  padding:8px 10px;

  border-radius:14px;

  font-size:12px;
  font-weight:600;

  cursor:pointer;

  transition:.25s;
}

.ges-modal-footer .ges-detail-btn:hover{
  background:#14458c;
  transform:translateY(-2px);
}

/* =========================
   ANIMATION
========================= */

@keyframes gesModalShow{
  from{
    opacity:0;
    transform:translateY(20px) scale(.96);
  }

  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

/* =========================
   LOADING
========================= */

#loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top: 6px solid #0b2d5c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}




/* ========================================
   MOBILE MODAL OPTIMIZATION
======================================== */

@media(max-width:768px){

  .ges-modal{
    padding:0;
  }

.ges-modal-content{
  width:100%;

  height:calc(100vh - 15px);

  margin-top:10px;
  margin-bottom:0;

  max-height:none;

  border-radius:18px 18px 0 0;
}

  .ges-modal-header{
    height:56px;
    padding:0 14px;
  }

  #ges-modal-title{
    font-size:16px;
  }

 

}