/* Custom Tailwind CSS overrides & additional styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
body {
  font-family: 'Inter', Arial, sans-serif;
  max-width: 100vw;
  overflow-x: hidden;
}
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
button, input[type="file"] {
  font-size: 1.1rem;
  min-height: 48px;
}

/* Hero/Introduction Section */
.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: #4f46e5; /* indigo-700 */
}
.hero-desc {
  font-size: 1.1rem;
  color: #374151; /* gray-600 */
}
.hero-icon {
  font-size: 2.2rem;
  color: #a78bfa; /* purple-400 */
}
.hero-point {
  font-size: 1rem;
  color: #4b5563; /* gray-700 */
}

/* Heading & Branding */
.heading-wiracalc {
  color: #4f46e5; /* indigo-700 */
  font-weight: 700;
}
.heading-sub {
  color: #a78bfa; /* purple-400 */
}

/* Button & Accent Colors */
.btn-wiracalc {
  background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
  color: #fff;
  font-weight: 600;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(76, 81, 255, 0.08);
}
.btn-wiracalc:hover {
  background: linear-gradient(90deg, #6d28d9 0%, #4338ca 100%);
  box-shadow: 0 4px 16px rgba(76, 81, 255, 0.15);
  transform: scale(1.05);
}

/* Output Table Accent */
.output-accent {
  background: linear-gradient(90deg, #ede9fe 0%, #e0e7ff 100%);
}

/* Responsive Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Glassmorphism Card Effect */
.bg-white, .glass-card {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,0.18);
}

/* Exported Image Styling */
.export-report {
  background: #fff !important;
  border-radius: 1.2rem !important;
  padding: 2rem !important;
  box-shadow: 0 4px 24px rgba(76, 81, 255, 0.08);
  max-width: 400px;
  margin: 0 auto;
}

/* Responsive max width for main container */
.w-full.max-w-md {
  max-width: 420px;
}

/* Tombol mode kalkulator */
.mode-btn {
  font-size: 0.95rem;
  padding: 0.5rem 1.2rem;
  border-radius: 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(76, 81, 255, 0.08);
}
.mode-btn.active {
  background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
  color: #fff;
}

/* Export buttons */
#exportExcel {
  background: linear-gradient(90deg, #34d399 0%, #60a5fa 100%);
}
#exportExcel:hover {
  background: linear-gradient(90deg, #059669 0%, #2563eb 100%);
}

/* Produk tersimpan */
#savedProducts li {
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
  background: #f3f4f6;
  margin-bottom: 0.3rem;
  cursor: pointer;
}
#savedProducts li:hover {
  background: #e0e7ff;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
}
@media (min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.about-card, .calc-card {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 4px 24px rgba(76, 81, 255, 0.10);
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.18);
}

/* Tabel Bahan Baku Dinamis */
table#bahanTable {
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 2px 8px rgba(76, 81, 255, 0.05);
  border-radius: 1.2rem;
  overflow: hidden;
}
table#bahanTable th, table#bahanTable td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
}
table#bahanTable th {
  font-weight: 600;
  color: #4f46e5;
  background: #eef2ff;
}
table#bahanTable td {
  background: #fff;
}
#emptyBahanRow {
  background: #f3f4f6;
  color: #a0aec0;
  font-style: italic;
}

/* Fluid Dashboard & Glassmorphism */
body.gradient-bg {
  background: linear-gradient(120deg, #e0e7ff 0%, #f3e8ff 100%);
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.fluid-dashboard {
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto;
  box-sizing: border-box;
}
.fluid-card {
  width: 90vw;
  max-width: 90vw;
  background: rgba(255,255,255,0.7);
  box-shadow: 0 8px 32px 0 rgba(80, 0, 120, 0.12);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(120, 80, 200, 0.12);
  transition: box-shadow 0.3s, background 0.3s;
}
.glass-card {
  background: rgba(255,255,255,0.8);
  box-shadow: 0 4px 24px 0 rgba(80, 0, 120, 0.10);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(120, 80, 200, 0.10);
}
.animate-fadeInUp {
  animation: fadeInUp 0.7s cubic-bezier(.39,.575,.565,1) both;
}
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}
/* Table Styling */
table {
  border-collapse: separate;
  border-spacing: 0;
}
th, td {
  border-bottom: 1px solid #e0e7ff;
  padding: 0.75rem;
  text-align: left;
}
th {
  background: linear-gradient(90deg, #ede9fe 0%, #e0e7ff 100%);
  color: #5b21b6;
  font-weight: 700;
}
tr {
  transition: background 0.3s;
}
tr.added-row {
  animation: rowFadeIn 0.5s;
}
tr.removed-row {
  animation: rowFadeOut 0.4s;
}
@keyframes rowFadeIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes rowFadeOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95); }
}
/* Button Styling */
.btn-wiracalc {
  background: linear-gradient(90deg, #a78bfa 0%, #6366f1 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(80, 0, 120, 0.08);
  border: none;
  outline: none;
  transition: background 0.3s, transform 0.2s;
}
.btn-wiracalc:hover {
  background: linear-gradient(90deg, #7c3aed 0%, #4f46e5 100%);
  transform: scale(1.05);
}
/* Icon Button */
.icon-btn {
  background: none;
  border: none;
  color: #7c3aed;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.icon-btn:hover {
  color: #ef4444;
  transform: scale(1.2);
}
/* Output Card */
#output {
  animation: fadeInUp 0.7s cubic-bezier(.39,.575,.565,1) both;
}
/* Empty State */
#emptyBahanRow, #emptyOperasionalRow {
  background: rgba(236, 233, 255, 0.7);
  color: #a3a3a3;
  font-size: 1rem;
  font-style: italic;
  border-radius: 12px;
  transition: background 0.3s;
}
/* Responsive */
@media (max-width: 900px) {
  .fluid-card {
    width: 98vw;
    max-width: 98vw;
    padding: 1.5rem;
  }
}
@media (max-width: 600px) {
  .fluid-card {
    width: 100vw;
    max-width: 100vw;
    padding: 0.5rem;
    border-radius: 0;
  }
  th, td {
    padding: 0.5rem;
    font-size: 0.95rem;
  }
}
/* Modern Typography */
h1, h2, h3, h4 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.5px;
}
p, label, input, button, table {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* Laporan Digital Export Wrapper */
#laporan-digital {
  background: #fff !important;
  box-shadow: 0 8px 32px 0 rgba(80, 0, 120, 0.12);
  border-radius: 24px;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
#laporan-digital table {
  background: #fff;
}
#laporan-digital th, #laporan-digital td {
  background: #fff;
  color: #333;
}
/* Thousand Separator Input Style */
input.thousand-separator {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
/* Responsive for Export */
@media (max-width: 900px) {
  #laporan-digital {
    padding: 1rem;
    max-width: 100vw;
  }
}
@media (max-width: 600px) {
  #laporan-digital {
    padding: 0.5rem;
    border-radius: 0;
    font-size: 0.95rem;
  }
  h1, h2, h3 {
    font-size: 1.2rem !important;
  }
}

/* Responsive Table Wrapper */
.overflow-x-auto {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border-radius: 16px;
}
@media (max-width: 600px) {
  .fluid-card {
    width: 100vw;
    max-width: 100vw;
    padding: 0.5rem;
    border-radius: 0;
  }
  th, td {
    padding: 0.4rem;
    font-size: 0.92rem;
  }
  #laporan-digital {
    padding: 0.5rem;
    border-radius: 0;
    font-size: 0.95rem;
  }
  h1, h2, h3 {
    font-size: 1.2rem !important;
  }
  .overflow-x-auto {
    border-radius: 0;
    padding: 0;
  }
}
