* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, input, select, textarea, button, table, th, td, h1, h2, h3, h4, p, span, div, a, label {
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.45), rgba(30, 58, 138, 0.3)), 
              url('https://lh3.googleusercontent.com/d/1JDnVt97YtM1lPKesLkXEI121bEeKe5jU') no-repeat center center fixed;
  margin: 0;
  padding: 0;
  background-size: cover;
  min-height: 100vh;
  color: #0f172a;
}

.hidden {
  display: none !important;
}

/* LOGIN CARD STYLING */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-card h2 {
  margin-top: 0;
  color: #1e3a8a;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
}

/* MAIN APP LAYOUT */
#app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  min-height: 100vh;
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 15px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.sidebar-header {
  color: #3b82f6;
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.sidebar .nav-link {
  color: #cbd5e1;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  width: 100%;
}

/* KOTAK INDIKATOR STOK (3 KOLOM MODERN) */
.dashboard-cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.summary-card {
  border-radius: 8px;
  color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: 280px; 
  overflow: hidden;
}

.card-merah { background: linear-gradient(135deg, #ef4444, #dc2626); }
.card-kuning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.card-hijau { background: linear-gradient(135deg, #10b981, #059669); }

.summary-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .badge-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.summary-card .card-body {
  padding: 10px;
  overflow-y: auto; 
  flex: 1;
}

.summary-card .card-body,
.summary-card .card-body *,
.kpi-list-scroll,
.kpi-list-scroll * {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
}

.card-kuning .card-body {
  background: rgba(0, 0, 0, 0.08);
}

.summary-card .card-body::-webkit-scrollbar { width: 6px; }
.summary-card .card-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
.summary-card .card-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.4); border-radius: 10px; }
.summary-card .card-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.6); }

/* DASHBOARD HEADER & KPI */
.dashboard-header-banner {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  text-align: center;
  padding: 18px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 12px;
  margin-bottom: 25px;
  text-transform: uppercase;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* GLASS CARDS & FORM STYLING */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  margin-bottom: 25px;
}

.glass-card h3 {
  margin-top: 0;
  color: #1e3a8a;
  font-size: 1.2rem;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.form-group { margin-bottom: 18px; }

label {
  font-weight: 600;
  color: #1e293b;
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

input, select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  align-items: end;
}

/* BUTTONS */
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }

.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-outline {
  background: transparent;
  border: 1px solid #3b82f6;
  color: #3b82f6;
}
.btn-outline:hover { background: #3b82f6; color: white; }

/* FILTER & BADGES */
.filter-panel {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 6px;
}

.filter-panel input {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: auto;
  min-width: 220px;
}

.badge-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  color: white;
  display: inline-block;
}

.bg-kritis { background-color: #e53e3e; }
.bg-aman { background-color: #38a169; }
.bg-habis { background-color: #718096; }

.kpi-list-scroll {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 5px;
}

.kpi-list-scroll::-webkit-scrollbar { width: 8px; }
.kpi-list-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.kpi-list-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); border-radius: 10px; }

/* EXCEL TABLES (POPPINS CLEAN) */
.excel-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  -webkit-overflow-scrolling: touch;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 500px;
}

.excel-table th {
  background-color: #1e3a8a;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 12px 10px;
  border: 1px solid #3b82f6;
  text-align: center;
}

.excel-table td {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #1e293b;
  text-align: center;
}

.excel-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.excel-table tbody tr:hover {
  background-color: #eff6ff;
}

/* KANBAN/KPI KEUANGAN COLOR PALETTE */
.kpi-container-keuangan {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); 
  gap: 12px; 
  margin-bottom: 20px;
}

.kpi-box {
  flex: 1;
  min-width: 170px;
  padding: 12px 10px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}

.kpi-value {
  font-size: 18px;
  font-weight: 800;
}

/* MEDIA QUERIES UNTUK TAMPILAN HP (RESPONSIF) */
@media (max-width: 768px) {
  #app-container { flex-direction: column; }
  .sidebar { width: 100%; min-height: auto; padding: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
  .sidebar-header { margin-bottom: 10px; padding-bottom: 10px; }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .sidebar .nav-link { margin-bottom: 0; padding: 8px 12px; font-size: 0.85rem; flex: 1 1 auto; justify-content: center; }
  .content { padding: 15px; }
  .dashboard-cards-container { grid-template-columns: 1fr; height: auto; }
  .dashboard-header-banner { font-size: 1.1rem; padding: 12px; margin-bottom: 15px; }
  .glass-card { padding: 15px; margin-bottom: 15px; }
  .login-card { padding: 25px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; margin-bottom: 5px; }
  .excel-table-wrapper { border: none; overflow-x: visible; }
  .excel-table { min-width: 100%; }
  .excel-table thead { display: none; }
  .excel-table, .excel-table tbody, .excel-table tr, .excel-table td { display: block; width: 100%; }
  .excel-table tr {
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
  .excel-table td {
    text-align: left;
    padding: 8px 0;
    border: none;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .excel-table td:last-child { border-bottom: none; padding-bottom: 0; margin-top: 6px; }
  .excel-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.78rem;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .excel-table td input, .excel-table td select {
    width: 100% !important;
    font-size: 0.95rem;
    padding: 10px 12px;
    border-radius: 8px;
  }
}