@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --mbh-blue: #007bff;
  --mbh-blue-600: #0063cc;
  --mbh-gold: #d4af37;
  --bg: #fff;
  --card: #fff;
  --text: #0e1a2b;
  --muted: #5b6b7c;
  --shadow: 0 10px 25px rgba(0, 0, 0, .08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 90px;
}

/* ========== HEADER FIX ========== */
header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

header img.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand .title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 20px;
  margin-left: 4px;
}

.brand .subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

/* tombol kanan */
header > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
  gap: 6px;
}

/* ========== GRID & CONTENT LAYOUT ========== */
.section-title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin: 24px 0 8px;
}

/* Cards di tab Data / Keuangan / Marketing */
.summary-cards,
.dashboard-grid,
.marketing-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Responsive: ubah jadi 2 kolom di HP */
@media (max-width: 680px) {
  .summary-cards,
  .dashboard-grid,
  .marketing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.summary-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.summary-card .tag {
  font-size: 12px;
  color: var(--muted);
}

.summary-card .num {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
}

.summary-card .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.brand-band {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(212, 175, 55, .14), rgba(0, 123, 255, .08));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .06);
}

.brand-band img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
}

.brand-band .n {
  font-weight: 600;
}

/* Charts */
.charts {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1024px) {
  .charts {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.chart-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}

/* Footer */
.footer {
  margin: 40px 0 86px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Form */
.form-wrap {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  outline: none;
  background: #fff;
  transition: border .2s, box-shadow .2s;
  font-family: inherit;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--mbh-blue);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, .12);
}

/* Table */
.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

th {
  background: #f7f9ff;
  text-align: left;
  font-weight: 600;
}

tr:hover td {
  background: #fafcff;
}

/* Button */
.btn {
  appearance: none;
  border: none;
  background: linear-gradient(90deg, var(--mbh-blue), var(--mbh-blue-600));
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 123, 255, .25);
  transition: transform .15s, box-shadow .15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 123, 255, .32);
}

.btn-ghost {
  background: #fff;
  color: var(--mbh-blue);
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: var(--shadow);
}

/* Tabbar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 6px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
}

.tabbar button {
  border: none;
  background: transparent;
  color: #667;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
}

.tabbar button.active {
  color: var(--mbh-blue);
}

.tabbar button.active::after {
  content: '';
  display: block;
  width: 36%;
  height: 3px;
  margin-top: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--mbh-blue), var(--mbh-gold));
}

/* Transisi antar-tab */
.tab-page {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .35s ease, transform .35s ease;
}

.tab-page.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Toast notif */
.toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  background: #0abf53;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  z-index: 80;
  display: none;
}

.toast.show {
  display: block;
  animation: fadeToast .18s ease;
}

@keyframes fadeToast {
  from {opacity: 0; transform: translate(-50%, 10px);}
  to {opacity: 1; transform: translate(-50%, 0);}
}

/* ========== RESPONSIVE HEADER (MOBILE) ========== */
@media (max-width: 600px) {
  header {
    padding: 10px 12px;
    gap: 8px;
  }
  header img.logo {
    width: 34px;
    height: 34px;
  }
  .brand .title {
    font-size: 18px;
  }
  .brand .subtitle {
    font-size: 11px;
  }
  header button {
    padding: 8px 10px;
    font-size: 12px;
  }
}
