/* === KAPSAM: SADECE dash-scope içinde geçerli === */
.dash-scope {
  --menu-tint: rgba(31, 41, 55, .045);  /* istersen #E9EEF4 gibi sabit hex de verebilirsin */
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background: #f5f6fa;
  font-family: "Segoe UI", sans-serif;
  /* Tab/Panel scroll’u ExtJS yönetsin; içerikler kendi içinde scroll alacak */
}

.dash-scope,
.dash-scope .dashboard,
.dash-scope .card-grid,
.dash-scope .data-section,
.dash-scope .chart-grid {
  background-color: var(--menu-tint) !important;
}

/* Kartların kendisi beyaz (veya gradient) kalsın */
.dash-scope .card.white,
.dash-scope .chart-box,
.dash-scope .data-box,
.dash-scope .gauge-card {
  background: #fff;
}


/* === Dashboard ana alanı === */
.dash-scope .dashboard {
  padding: 18px; 
  gap: 18px; 
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  min-height: auto;
  overflow-y: auto;
  overflow-x: hidden;
}

/* === ÜST KARTLAR === */
.dash-scope .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

/* Kart stili */
.dash-scope .card {
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  min-height: 72px;
  position: relative;
  overflow: visible; /* gölge dışarı taşsın */
}

/* Alttaki yumuşak gölge */
.dash-scope .card::after{
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -14px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,.28) 0%,
    rgba(0,0,0,.20) 40%,
    rgba(0,0,0,0) 70%
  );
  filter: blur(6px);
  opacity: 0;
  transform: scale(.95);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.dash-scope .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.dash-scope .card-value {
  font-size: 34px;
  font-weight: 400;
  margin-bottom: 6px;
}

.dash-scope .card-label {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 30px;
}

.dash-scope .card i {
  font-size: 60px;
  opacity: 0.85;
  margin-left: 15px;
  transition: transform 0.25s ease;
}

.dash-scope .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.18);
  cursor: pointer;
}

.dash-scope .card:hover i {
  transform: scale(1.1);
}

/* Renk geçişleri */
.dash-scope .card.green  { background: linear-gradient(to right, #66bb6a, #43a047); }
.dash-scope .card.blue   { background: linear-gradient(to right, #42a5f5, #1e88e5); }
.dash-scope .card.orange { background: linear-gradient(to right, #ffa726, #fb8c00); }
.dash-scope .card.red    { background: linear-gradient(to right, #ef5350, #e53935); }

/* === BEYAZ KART === */
.dash-scope .card.white{
  background:#fff;
  color:#3a3939;           /* .card { color:white }'ı ezer */
  border:1px solid #e6e9ee;
}
.dash-scope .card.white .card-content .card-value{ font-weight: 400 !important; }
.dash-scope .card.white .card-label{margin-top: 30px; color:#511dca; opacity:1; }
.dash-scope .card.white i{ color:#656ba5; opacity:.7;font-size: 60px; }
.dash-scope .card.white:hover{ box-shadow:0 10px 22px rgba(0,0,0,.14); border-color:#dfe3e8; }

/* === BİLGİ KARTLARI === */
.dash-scope .card-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}
.dash-scope .card-sub {
  background: #fff;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.25s ease-in-out;
  text-align: center;
}
.dash-scope .card-sub:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  cursor: pointer;
}
.dash-scope .card-sub h4 {
  color: #333;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.dash-scope .card-sub small {
  color: #888;
  margin-top: 5px;
  font-size: 13px;
}

/* === GRAFİKLER === */
.dash-scope .chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}
.dash-scope .chart-box {
  background: #fff;
  border-radius: 6px;
  padding: 18px 22px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  width: 100%;
  overflow: hidden;
}
.dash-scope .chart-box h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: #444;
  font-weight: 600;
}

/* === TABLOLAR === */
.dash-scope .data-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
  width: 100%;
}
.dash-scope .data-box {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 18px 20px;
}
.dash-scope .data-box h3 {
  font-size: 18px;
  color: #333;
  font-weight: 600;
  margin-bottom: 12px;
}
.dash-scope .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dash-scope .data-table th {
  background: #f1f3f5;
  text-align: left;
  padding: 10px;
  font-weight: 600;
  color: #444;
}
.dash-scope .data-table td {
  padding: 10px;
  border-top: 1px solid #eee;
  color: #333;
}
.dash-scope .data-table i {
  color: #666;
  cursor: pointer;
}
.dash-scope .badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}

/* === Görev Grafikleri (Açık / Tamamlanan) === */
.dash-scope #openTaskChart,
.dash-scope #completeTaskChart {
  max-width: 100%;
  height: 200px !important;
  margin: 0 auto;
  display: block;
}
.dash-scope .chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-weight: bold;
  color: #000;
  font-size: 20px;
  line-height: 1.2;
}

/* === Gauge === */
.dash-scope .gauge-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 14px 20px 10px 20px;
  text-align: center;
  position: relative;
  height: 240px;
}
.dash-scope .gauge-title {
  font-size: 15px;
  font-weight: 600;
  color: #444;
  margin: 0 0 10px 0;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 4px;
}
.dash-scope .gauge-wrapper { position: relative; height: 180px; }
.dash-scope #openTaskGauge { width: 100%; height: 180px !important; display: block; }
.dash-scope .gauge-center {
  position: absolute; top: 60%; left: 50%;
  transform: translate(-50%, -50%); text-align:center;
}
.dash-scope .gauge-value { font-size: 28px; font-weight: 700; color: #000; }
.dash-scope .gauge-label { font-size: 13px; color: #777; margin-top: 2px; font-family: "Segoe UI", sans-serif; }
.dash-scope .gauge-scale {
  position: absolute; bottom: -2px; left: 0; width: 100%;
  display: flex; justify-content: space-between; font-size: 12px; color: #888; padding: 0 20px;
}

/* TabSheet gövdesinde kaydırmayı etkinleştir */
.dash-tab .x-panel-body,
.dash-tab .x-body {
  overflow: auto !important;
}

/* Badge renkleri */
.dash-scope .badge.green  { background-color: #43a047; }
.dash-scope .badge.orange { background-color: #fb8c00; }
.dash-scope .badge.red    { background-color: #e53935; }

/* === Responsive === */
@media (max-width: 1024px) {
  .dash-scope .chart-grid,
  .dash-scope .data-section { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-scope .card, .dash-scope .card.white { padding: 12px; }
  .dash-scope .card i, .dash-scope .card.white i { font-size: 28px; }
  .dash-scope .card-sub h4 { font-size: 16px; }
}
