/* =========================================
   VIEW 6: HALAMAN BUILDING / BANK / MINE
   ========================================= */
.building-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b161c 0%, #071015 100%);
  overflow-y: auto;
  overflow-x: hidden;
}

.building-view::-webkit-scrollbar { width: 4px; }
.building-view::-webkit-scrollbar-thumb { background: #2c424d; border-radius: 4px; }

/* Banner Atas (Berubah antara BUILDING, BANK, & MINING) */
.building-hero-banner {
  height: 76px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 100%),
    linear-gradient(135deg, #fde68a 0%, #bef264 50%, #38bdf8 100%);
  border-bottom: 1px solid #334155;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.building-hero-banner.bank-mode {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.5) 100%),
    linear-gradient(135deg, #fef08a 0%, #d97706 48%, #78350f 100%);
}

.building-hero-banner.mine-mode {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.5) 100%),
    linear-gradient(135deg, #581c87 0%, #9333ea 45%, #f59e0b 100%);
}

.building-hero-art {
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.building-hero-title {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: -1.5px -1.5px 0 #78350f, 1.5px -1.5px 0 #78350f, -1.5px 1.5px 0 #78350f, 1.5px 1.5px 0 #78350f, 0 3px 6px rgba(0, 0, 0, 0.65);
  z-index: 2;
}

/* 3 Tab Sub-Menu: Building | Bank | Mine */
.building-tabs-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #0d131a;
  border-bottom: 1.5px solid #475569;
  padding-top: 4px;
  position: relative;
  flex-shrink: 0;
}

.b-tab-item {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  padding: 9px 4px;
  cursor: pointer;
  position: relative;
  border-radius: 6px 6px 0 0;
}

.b-tab-item.active {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  color: #ffffff;
  border-top: 1.5px solid #94a3b8;
  border-left: 1.5px solid #94a3b8;
  border-right: 1.5px solid #94a3b8;
}

.mine-notif-badge {
  position: absolute;
  top: -7px;
  right: 8px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid #ffffff;
}

/* Header Ringkasan Income */
.b-summary-bar {
  background: linear-gradient(90deg, #273138 0%, #1a2228 100%);
  border-bottom: 1px solid #11161a;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.b-summary-income {
  font-size: 13px;
  font-weight: 800;
  color: #4ade80;
}

.b-summary-details {
  padding: 10px 12px 8px;
  font-size: 12px;
  line-height: 1.45;
  border-bottom: 1px solid #1e293b;
}

.b-note-text {
  color: #e2e8f0;
  font-weight: 600;
  margin-bottom: 6px;
}

.b-stat-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  font-size: 13px;
  font-weight: 800;
  padding: 1px 0;
}

/* Daftar Kartu Bangunan */
.building-list-container {
  padding: 8px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.building-card {
  background: linear-gradient(180deg, #1b2833 0%, #121c24 100%);
  border: 1.5px solid #3c4f5e;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.55);
}

.b-icon-slot {
  width: 60px;
  height: 60px;
  border-radius: 9px;
  background: radial-gradient(circle, #fefce8 35%, #d6cbb5 100%);
  border: 2px solid #a8a29e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.6);
}

.b-info-col {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.b-name {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
}

.b-income-line {
  font-size: 11.5px;
  font-weight: 800;
  color: #e2e8f0;
}

.b-income-val { color: #4ade80; }

.b-ratio-line {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  margin-top: 1px;
}

.b-actions-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.b-btn-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 66px;
}

.b-meta-label {
  font-size: 10px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.1;
}

.b-meta-val {
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 3px;
  white-space: nowrap;
}

.b-meta-val.cost { color: #4ade80; }
.b-meta-val.owned { color: #ffffff; }

.btn-b-action {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn-b-action.buy {
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 55%, #64748b 100%);
  border: 1.5px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 1px 0 #ffffff;
}
.btn-b-action.buy:active { transform: scale(0.95); }

.btn-b-action.sell {
  background: linear-gradient(180deg, #4b5563 0%, #374151 55%, #1f2937 100%);
  border: 1.5px solid #6b7280;
  color: #111827;
  cursor: not-allowed;
}

.btn-b-action.sell.active {
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 55%, #64748b 100%);
  border: 1.5px solid #e2e8f0;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 1px 0 #ffffff;
}
.btn-b-action.sell.active:active { transform: scale(0.95); }

/* =========================================
   STYLE TAB BANK (DEPOSIT & WITHDRAW)
   ========================================= */
.bank-content {
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bank-desc-text {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.45;
}

.bank-balance-card {
  background: linear-gradient(180deg, #273440 0%, #17212b 100%);
  border: 1.5px solid #475569;
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.bank-balance-label {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.bank-balance-amount {
  font-size: 19px;
  font-weight: 900;
  color: #4ade80;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.bank-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bank-input-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}

.bank-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-input-field {
  flex: 1;
  height: 44px;
  border-radius: 4px;
  border: 1.5px solid #64748b;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  padding: 0 12px;
  outline: none;
  user-select: text;
}

.bank-input-field:focus {
  border-color: #38bdf8;
  background: #ffffff;
}

.btn-bank-submit {
  width: 112px;
  height: 44px;
  border-radius: 7px;
  border: 1.5px solid #cbd5e1;
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 55%, #64748b 100%);
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 #ffffff;
  flex-shrink: 0;
  transition: transform 0.1s;
}

.btn-bank-submit:active {
  transform: scale(0.96);
}

/* =========================================
   STYLE TAB MINES (MINING & MONSTER PICK)
   ========================================= */
.mines-list-container {
  padding: 8px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mine-card {
  border-radius: 8px;
  border: 1.5px solid #475569;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.65);
}

.mine-card-header {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.mine-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.mine-elem-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.mine-reward-tier-text {
  font-size: 11px;
  font-weight: 900;
  color: #4ade80;
  text-shadow: 0 1px 2px #000;
}

.mine-banner {
  height: 82px;
  position: relative;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mine-bg-ordinary { background: linear-gradient(135deg, #78350f 0%, #d97706 55%, #fef3c7 100%); }
.mine-bg-blade { background: linear-gradient(135deg, #064e3b 0%, #0d9488 55%, #ccfbf1 100%); }
.mine-bg-crystal { background: linear-gradient(135deg, #1e1b4b 0%, #2563eb 55%, #bae6fd 100%); }
.mine-bg-lava { background: linear-gradient(135deg, #450a0a 0%, #dc2626 55%, #fed7aa 100%); }
.mine-bg-blessed { background: linear-gradient(135deg, #713f12 0%, #eab308 55%, #fef9c3 100%); }
.mine-bg-cursed { background: linear-gradient(135deg, #2e1065 0%, #15803d 65%, #bbf7d0 100%); }
.mine-bg-mysterious { background: linear-gradient(135deg, #3b0764 0%, #9333ea 55%, #f3e8ff 100%); }

.mine-banner-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  z-index: 2;
}

.mine-preview-boxes {
  display: flex;
  gap: 4px;
}

.mine-reward-box {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.mine-right-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mine-slot-btn {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.mine-slot-btn:active { transform: scale(0.94); }

.mine-slot-count {
  font-size: 10px;
  font-weight: 900;
  color: #38bdf8;
  margin-top: 1px;
}

.btn-mine-start {
  height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #ffffff;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}
.btn-mine-start:active { transform: scale(0.95); }

.btn-mine-purchase {
  min-width: 108px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid #e0f2fe;
  background: linear-gradient(180deg, #bae6fd 0%, #38bdf8 55%, #0284c7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.75);
}
.btn-mine-purchase:active { transform: scale(0.95); }

.btn-mine-purchase .p-top {
  font-size: 11px;
  font-weight: 900;
  color: #0f172a;
}

.btn-mine-purchase .p-cost {
  width: 100%;
  background: #0c4a6e;
  color: #4ade80;
  font-size: 11.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
}

.mine-progress-center {
  flex: 1;
  text-align: center;
  line-height: 1.25;
}

.mine-inprogress-label {
  font-size: 13.5px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.mine-remaining-time {
  font-size: 10.5px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  margin-top: 2px;
}

.btn-mine-complete {
  min-width: 96px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px solid #e0f2fe;
  background: linear-gradient(180deg, #bae6fd 0%, #38bdf8 55%, #0284c7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.75);
}

.btn-mine-complete .c-top {
  font-size: 10.5px;
  font-weight: 900;
  color: #0f172a;
}

.btn-mine-complete .c-cost {
  width: 100%;
  background: #0c4a6e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 4px;
  border-radius: 4px;
  text-align: center;
}

.btn-mine-claim {
  height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #bbf7d0;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  color: #052e16;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.75);
}

/* =========================================
   MODAL PEMILIHAN MONSTER (MONSTER SELECTION)
   ========================================= */
.mine-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.mine-modal-box {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2.5px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

.mine-modal-header {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  padding: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  color: #fef08a;
  border-bottom: 1px solid #475569;
}

.mine-modal-subbar {
  background: #0b1116;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #4ade80;
  border-bottom: 1px solid #1e293b;
}

.mine-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #334155;
  border: 1px solid #94a3b8;
  color: #ffffff;
  font-size: 11px;
  margin-left: 4px;
  cursor: pointer;
}

.mine-sel-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  padding: 10px;
  max-height: 310px;
  overflow-y: auto;
}

.mine-pick-slot {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.mine-pick-slot.selected {
  box-shadow: 0 0 0 2px #4ade80, inset 0 0 10px rgba(74, 222, 128, 0.6);
}

.mine-pick-check {
  position: absolute;
  bottom: 1px;
  right: 2px;
  background: #16a34a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 3px;
}

.mine-modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px 12px;
  background: #0b1116;
  border-top: 1px solid #1e293b;
}

.btn-mine-cancel {
  padding: 10px 0;
  border-radius: 8px;
  border: 1.5px solid #a7f3d0;
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.btn-mine-enlist {
  padding: 10px 0;
  border-radius: 8px;
  border: 1.5px solid #bfdbfe;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}