:root {
  --bg: #09090b;
  --card: #121214;
  --card-hover: #17171a;
  --text: #f4f4f5;
  --muted: #808089;
  --line: #222226;
  --line-focus: #3e3e44;
  --white: #ffffff;
}

@font-face {
  font-family: 'Rockstone';
  src: url('fonts/Rockstone.ttf') format('truetype');
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* HEADER & UTILITY */
header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 24px 20px;
}

.judul-malamar {
  background: linear-gradient(180deg, #FFD54F, #FF9800);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Rockstone', sans-serif; /* Menggunakan font utama Anda */
}

.top-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo-link {
  display: inline-block;
  line-height: 0;
}

.logo,
.title-logo {
  width: auto;
  height: 38px;
  object-fit: contain;
  display: block;
}

.count-badge {
  font-size: 11px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
}

h1 {
  margin: 8px 0 4px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.035em;
  font-weight: 650;
}

.description {
  font-size: 13px;
  color: var(--muted);
}

/* QUICK ACCESS PINNED */
.quick-access {
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-access::-webkit-scrollbar {
  display: none;
}

.quick-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.quick-chip {
  background: #18181b;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background: #242429;
  border-color: var(--line-focus);
}

/* CONTROLS (Search & Filter Pills) */
.controls {
  max-width: 1080px;
  margin: 14px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-box:focus {
  border-color: var(--line-focus);
}

.search-box::placeholder {
  color: var(--muted);
}

.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  color: var(--text);
  border-color: var(--line-focus);
}

.pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}

/* DOCUMENT GRID & SLIM CARDS */
main {
  max-width: 1080px;
  margin: 10px auto 0;
  padding: 0 24px 60px;
}

.section {
  margin-top: 24px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.credit-photo{
  position:absolute;inset:0;
  background-size:cover;background-position:center;
  opacity:0;transform:scale(1.03);transition:.45s;
}
.credit-photo:after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,rgba(10,12,8,.82),rgba(10,12,8,.2));
}
.credit-row:hover .credit-photo{opacity:1;transform:scale(1)}

.card {
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: unset;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--line-focus);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: var(--text);
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.type-badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}

.card-description {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.3;
}

.no-results {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* MODAL PREVIEW */
.modal {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  z-index: 100;
}

.modal.show {
  display: flex;
  flex-direction: column;
}

.viewer-top {
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.button {
  padding: 7px 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: #17171a;
  border-color: var(--line-focus);
}

.document-title {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.zoom-btn:hover {
  border-color: var(--line-focus);
}

.zoom-level {
  min-width: 42px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.tab {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
  background: #141417;
}

.tab.active {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.viewer {
  flex: 1;
  min-height: 0;
  padding: 10px;
  overflow: auto;
  position: relative; /* Tambahkan ini */
}

.viewer-frame {
  width: 100%;
  height: 100%;
  min-height: 500px; /* Berikan batas minimum tinggi agar iframe maps tidak 0px */
  position: relative; /* Tambahkan ini */
}

.viewer iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

/* MOBILE RESPONSIVE */
@media (max-width: 640px) {
  header {
    padding: 24px 14px 12px;
  }
  .controls, main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .viewer-top {
    gap: 6px;
    padding: 0 10px;
  }
  .button {
    padding: 6px 8px;
    font-size: 11px;
  }
  #zoomReset {
    display: none;
  }
  .zoom-level {
    min-width: 32px;
    font-size: 10px;
  }
  .zoom-btn {
    width: 26px;
    height: 26px;
  }
}