*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{

  font-family:Arial;

  background:#0f172a;

  color:white;

  padding:10px;
  min-height:100vh;
}

.container{
  width:100%;
}

.dashboard-bg{
  position:fixed;
  inset:0;
  background-image: url('dashboard-bg.png');
  background-size:cover;
  background-position:center;
  opacity:0.06;
  pointer-events:none;
  z-index:-1;
}

header{

  margin-bottom:10px;
}

header h1{

  font-size:28px;

  margin-bottom:6px;
}

header p{

  color:#94a3b8;
  font-size:13px;
}

.kpi-grid{

  display:grid;

  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));

  gap:12px;

  margin-bottom:30px;
}

.card{

  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));

  border:1px solid rgba(255,255,255,0.08);

  border-radius:18px;

  padding:16px 16px 14px 16px;

  backdrop-filter:blur(6px);

  transition:transform .2s ease, box-shadow .2s ease;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.card-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  margin-left:48px;
}

.card-icon{
  position:absolute;
  top:18px;
  left:18px;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(255,255,255,0.12);
  color:#38bdf8;
  flex-shrink:0;
  box-shadow:0 10px 20px rgba(0,0,0,0.08);
}

.card-icon svg{
  width:20px;
  height:20px;
}

.card-icon-basic{ background:linear-gradient(135deg, rgba(124,58,237,0.15), rgba(99,102,241,0.18)); color:#818cf8; }
.card-icon-rm{ background:linear-gradient(135deg, rgba(239,68,68,0.16), rgba(244,63,94,0.18)); color:#ef4444; }
.card-icon-purchase{ background:linear-gradient(135deg, rgba(16,185,129,0.16), rgba(16,185,129,0.22)); color:#10b981; }
.card-icon-consumption{ background:linear-gradient(135deg, rgba(245,158,11,0.16), rgba(249,115,22,0.22)); color:#f97316; }
.card-icon-scrap{ background:linear-gradient(135deg, rgba(245,158,11,0.16), rgba(249,115,22,0.18)); color:#f59e0b; }
.card-icon-inhouse{ background:linear-gradient(135deg, rgba(34,197,94,0.16), rgba(16,185,129,0.18)); color:#22c55e; }
.card-icon-vendor{ background:linear-gradient(135deg, rgba(129,140,248,0.16), rgba(99,102,241,0.18)); color:#818cf8; }
.card-icon-headcount{ background:linear-gradient(135deg, rgba(168,85,247,0.16), rgba(168,85,247,0.22)); color:#a855f7; }

.card:hover{

  transform:translateY(-5px);
}

.card h3{

  color:#cbd5e1;

  margin-bottom:6px;
  font-size:12px;
}

.card h1{

  font-size:22px;

  color:#38bdf8;
  margin-top:4px;
}

.kpi-value-small{
  font-size:12px;
  color:#94a3b8;
}

.kpi-grid .card{
  min-height:78px;
  padding:14px 16px;
}

.kpi-grid .card:hover{
  transform:translateY(-4px);
  box-shadow:0 6px 18px rgba(0,0,0,0.35);
}

.chart-grid{

  display:grid;

  grid-template-columns:repeat(4,minmax(0,1fr));

  gap:12px;

  margin-bottom:12px;
}

.dashboard-grid{
  display:grid;
  gap:20px;
  margin-bottom:30px;
}

.top-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:4px;
}

.info-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:8px;
}

.kpi-card{
  min-height:70px;
  padding:8px 10px;
}

.kpi-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.label{
  font-size:12px;
  letter-spacing:0.6px;
  color:#ffffff;
  font-weight:700;
}

.value{
  font-size:20px;
  color:#ffffff;
  font-weight:800;
}

.kpi-icon{
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  box-shadow:0 14px 30px rgba(15,23,42,0.22);
  background:rgba(255,255,255,0.06);
}

.kpi-icon svg{
  width:32px !important;
  height:32px !important;
}

.kpi-icon svg,
.header-logo{
  width:18px;
  height:18px;
}

.kpi-icon-total{background:linear-gradient(135deg, rgba(59,130,246,0.16), rgba(96,165,250,0.2));}
.kpi-basic{background:linear-gradient(135deg, rgba(99,102,241,0.16), rgba(124,58,237,0.22));}
.kpi-rm{background:linear-gradient(135deg, rgba(239,68,68,0.16), rgba(244,63,94,0.22));}
.kpi-scrap{background:linear-gradient(135deg, rgba(245,158,11,0.16), rgba(251,146,60,0.22));}
.kpi-inhouse{background:linear-gradient(135deg, rgba(34,197,94,0.16), rgba(52,211,153,0.22));}
.kpi-vendor{background:linear-gradient(135deg, rgba(129,140,248,0.16), rgba(129,140,248,0.22));}
.kpi-head{background:linear-gradient(135deg, rgba(168,85,247,0.16), rgba(168,85,247,0.22));}
.kpi-purchase{background:linear-gradient(135deg, rgba(16,185,129,0.16), rgba(56,189,248,0.22));}
.kpi-consumption{background:linear-gradient(135deg, rgba(249,115,22,0.16), rgba(251,146,60,0.22));}

.chart-card{

  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));

  padding:0px;

  border-radius:10px;

  height:220px;

  overflow:hidden;
}

.chart-card.compact{ height:210px; }
.chart-card.small-chart{ height:210px; display:flex; align-items:center; justify-content:center; }

.chart-card canvas{

  width:100% !important;
  max-height:190px !important;
}

.chart-card h2{
  font-size:15px;
  margin:0 0 8px;
  color:#f8fafc;
}

.table-card{

  background:rgba(255,255,255,0.05);

  padding:20px;

  border-radius:16px;
}

.tables-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}

table{

  width:100%;

  border-collapse:collapse;

  margin-top:10px;
}

table th{

  background:#1e293b;

  padding:12px;

  text-align:left;
}

table td{

  padding:12px;

  border-bottom:1px solid #334155;
}

table tr:hover{

  background:#1e293b;
}

@media(max-width:900px){

  .chart-grid{

    grid-template-columns:1fr;
  }

}
.top-header{

  display:flex;

  justify-content:space-between;

  align-items:center;

  margin-bottom:14px;

  flex-wrap:wrap;
  gap:12px;
}

.top-header > div:first-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.filter-box{

  display:flex;

  align-items:center;

  gap:8px;
}

.filter-box label{

  color:#cbd5e1;

  font-size:13px;
  white-space:nowrap;
}

.filter-box input{

  background:#1e293b;

  color:white;

  border:1px solid #334155;

  padding:8px 12px;

  border-radius:10px;

  font-size:14px;
  min-width:150px;
}

.filter-box input::-webkit-calendar-picker-indicator{

  filter:invert(1);
}
.chart-card canvas{

  width:100% !important;

  height:340px !important;
}