/* ==================================================================
   economy.css — gaya untuk modul Builder 2 (ekonomi & market).
   Palet mengikuti tema game: cokelat hangat + emas (#78350f / #f5b727),
   selaras dengan social.css. Semua kelas memakai prefix eco- agar
   tidak bentrok dengan CSS worker lain.
   Panel: samping kanan, tidak menutupi seluruh map. Bila CSS core
   worker 1 sudah mengatur .panel, aturan di sini melengkapi (fallback
   positioning mandiri agar panel tetap bisa dipakai tanpa CSS core).
   ================================================================== */

/* ---------- Panel ekonomi (fallback positioning) ---------- */
.eco-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(460px, 94vw);
  max-height: calc(100vh - 24px);
  display: none;
  flex-direction: column;
  background: #fffbeb;
  color: #1a1a1a;
  border: 1px solid #f5b727;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 9000;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
}
.eco-panel.open { display: flex; }
.eco-panel .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #fde68a;
  flex: 0 0 auto;
}
.eco-panel .panel-title {
  margin: 0;
  font-size: 16px;
  color: #92400e;
}
.eco-panel .panel-close {
  border: none;
  background: none;
  font-size: 17px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
}
.eco-panel .panel-close:hover { color: #1a1a1a; }
.eco-body {
  padding: 10px 14px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* ---------- Tombol ---------- */
.eco-btn {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid #d6a419;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.eco-btn:hover { background: #fde68a; }
.eco-btn:active { transform: translateY(1px); }
.eco-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.eco-btn-primary {
  background: #f5b727;
  border-color: #b45309;
  color: #451a03;
}
.eco-btn-primary:hover { background: #fbbf24; }
.eco-btn-gold {
  background: #fef9c3;
  border-color: #ca8a04;
  color: #854d0e;
}
.eco-btn-block { display: block; width: 100%; margin: 8px 0; }
.eco-btn-small { padding: 5px 8px; font-size: 12px; }

/* ---------- Form ---------- */
.eco-input,
.eco-select {
  padding: 7px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: #1a1a1a;
  box-sizing: border-box;
}
.eco-qty { width: 72px; flex: 0 0 auto; }
.eco-form .eco-input,
.eco-form .eco-select {
  display: block;
  width: 100%;
  margin: 4px 0 10px;
}
.eco-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #92400e;
  margin-top: 6px;
}

/* ---------- Saldo ---------- */
.eco-balances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 10px;
}
.eco-balance {
  flex: 1 1 120px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
}
.eco-balance-label {
  display: block;
  font-size: 11.5px;
  color: #6b7280;
  font-weight: 600;
}
.eco-balance-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}
.eco-balance-sub {
  display: block;
  font-size: 11.5px;
  color: #6b7280;
}

/* ---------- Baris, kartu, chip ---------- */
.eco-section {
  margin: 16px 0 8px;
  font-size: 14.5px;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
  padding-bottom: 3px;
}
.eco-rows { display: flex; flex-direction: column; gap: 6px; }
.eco-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 7px 9px;
}
.eco-row-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.eco-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eco-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}
.eco-card-title { font-weight: 700; color: #78350f; margin-bottom: 2px; }
.eco-card-big { font-size: 17px; font-weight: 700; margin: 2px 0; }
.eco-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.eco-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.eco-chip {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
}
.eco-badge {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
}
.eco-badge-off { background: #dc2626; }

/* ---------- Catatan & peringatan ---------- */
.eco-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: #6b7280;
  background: #fef9ec;
  border-left: 3px solid #f59e0b;
  padding: 8px 10px;
  margin: 8px 0;
}
.eco-burn {
  color: #92400e;
  font-weight: 600;
}
.eco-warn {
  font-size: 12.5px;
  line-height: 1.5;
  color: #991b1b;
  background: #fee2e2;
  border-left: 3px solid #ef4444;
  padding: 8px 10px;
  margin: 8px 0;
}
.eco-locked {
  font-size: 14px;
  line-height: 1.6;
  background: #f3f4f6;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  padding: 14px;
  margin: 10px 0;
  color: #374151;
}
.eco-small { font-size: 12px; color: #6b7280; }

/* ---------- Kalender login & Pass ---------- */
.eco-login-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}
.eco-login-day {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
}
.eco-login-today {
  border-color: #f5b727;
  box-shadow: 0 0 0 2px #fef3c7;
}
.eco-login-done { opacity: 0.6; }
.eco-login-num { font-weight: 700; color: #78350f; font-size: 13px; }
.eco-pass-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}

/* ---------- Menu bar fallback (bila core belum menyediakan) ---------- */
.eco-menu-bar {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 96vw;
  background: rgba(255, 251, 235, 0.96);
  border: 1px solid #f5b727;
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 8900;
  box-sizing: border-box;
}
.eco-menu-btn {
  border: 1px solid #d6a419;
  border-radius: 999px;
  background: #fef3c7;
  color: #78350f;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.eco-menu-btn:hover { background: #fde68a; }

/* ---------- Toast fallback (bila #toasts core belum ada) ---------- */
.eco-toasts {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  pointer-events: none;
}
.eco-toast {
  background: #451a03;
  color: #fef3c7;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13.5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
}
