/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* * {
  cursor: url('/assets/cursor.png') 0 0, auto !important;
} */

body {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  background: #008080;
  color: #e5e7eb;
}

.hidden {
  display: none;
}

.seo-intro {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.desktop {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 24px;
  overflow: hidden;
  background-color: #008080;
}

.desktop-icons {
  position: relative;
  width: 100%;
  height: calc(100% - 48px); /* dikurangi taskbar */
  z-index: 0;
  overflow-y: visible; /* desktop tidak perlu scroll */
  padding-right: 8px;
}

/* ===== GRID VISUAL DEBUG ===== */
.desktop-icons.show-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 1px, transparent 1px);

  background-size: calc(112px + 24px) calc(112px + 24px);

  background-position: 0 0;
}

/* opsional smooth scroll */
.desktop-icons::-webkit-scrollbar {
  width: 8px;
}
.desktop-icons::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.desktop-icons::-webkit-scrollbar-track {
  background: transparent;
}

.app {
  position: absolute;
  width: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.app__icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.app__label {
  margin-top: 8px;
  font-size: 8px;
  text-align: center;
  line-height: 1.2;
  opacity: 0.9;
}

.window-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ===== WINDOWS 95 STYLE ===== */
.window {
  position: absolute;
  width: 420px;
  height: 300px;
  background: #c0c0c0; /* abu-abu Windows klasik */
  border: 2px solid #fff; /* border putih tegas */
  border-left-color: #fff;
  border-top-color: #fff;
  border-right-color: #555; /* border gelap kanan/bawah */
  border-bottom-color: #555;
  overflow: hidden;
  pointer-events: auto;
  font-family: 'Press Start 2P', monospace;
  display: flex;
  flex-direction: column;
}

.window__header {
  height: 28px;
  background: #000080; /* header biru tua */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  cursor: grab;
  border-bottom: 2px solid #fff; /* efek bevel */
  box-sizing: border-box;
}

.window__header img.app__icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.window__title {
  font-size: 10px;
  color: #fff;
  display: flex;
  align-items: center;
}

/* Kontrol kotak */
.window__controls button {
  width: 18px;
  height: 18px;
  margin-left: 1px !important;
  border: 2px solid #fff;
  border-left-color: #fff;
  border-top-color: #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  background: #c0c0c0;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 0;
  cursor: pointer;
}

.window__controls button:hover {
  background: #808080; /* hover gelap */
}

/* Content window */
.window__content {
  padding: 8px;
  font-size: 8px;
  line-height: 1.2;
  color: #000;
  background: #c0c0c0;
}

/* ===== WINDOW CONTENT WRAPPER ===== */
.window__content {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 0;
  background: #c0c0c0;
}

/* ===== REAL SCROLL AREA ===== */
.content-scroll {
  height: 100%;
  overflow-y: scroll;
  padding: 15px 35px 15px 15px;
  font-size: 8px;
  line-height: 1.4;
  color: #000;

  scrollbar-width: none;
}
.content-scroll::-webkit-scrollbar {
  display: none;
}

/* ===== PIXEL SCROLLBAR ===== */
.pixel-scrollbar {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: calc(100% - 8px);
  display: flex;
  flex-direction: column;

  background: #c0c0c0;
  border: 2px solid #555;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080;
}

.scroll-btn {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 8px;
  cursor: pointer;
  user-select: none;

  background: #e0e0e0;
  border-bottom: 2px solid #555;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080;
}

.scroll-btn.down {
  border-top: 2px solid #555;
  border-bottom: none;
}

.pixel-track {
  flex: 1;
  position: relative;
}

.pixel-thumb {
  position: absolute;
  left: 0;
  width: 100%;

  background: #e0e0e0;
  border: 2px solid #555;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080;

  cursor: pointer;
}

/* ===== WINDOW HEADER ICON ===== */
.window__header img.app__icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 0; /* hilangkan radius */
  object-fit: contain; /* supaya tidak terdistorsi */
}

/* ===== WINDOW CONTROLS ===== */
.window__controls {
  display: flex;
  align-items: center;
  gap: 0; /* rapatkan tombol */
}

.window__controls button {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-left-color: #fff;
  border-top-color: #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  background: #c0c0c0;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1;
}

.window__controls button + button {
  margin-left: 1px;
}

.window__controls button:hover {
  background: #808080;
}

.window.minimized {
  pointer-events: none;
  visibility: hidden;
}

/* ===== TASKBAR ===== */
.taskbar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  height: 64px;
  padding: 8px 16px;

  display: flex;
  justify-content: center;
  align-items: flex-end;

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 9999;
}

.taskbar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.taskbar__apps {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.taskbar-item {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
}
.taskbar-item img {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  transition: transform 0.15s ease;
  will-change: transform;
}

.taskbar-item.active img {
  transform: scale(1.25);
}

.boot-log .info {
  color: #00ff88;
}

.boot-log .ok {
  color: #00ddff;
}

.boot-log .warn {
  color: #ffff55;
}

.boot-log .error {
  color: #ff5555;
}

#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #00ff88;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.boot-ascii {
  margin-bottom: 12px;
  color: #00ffaa;
}

.boot-body {
  display: flex;
  flex-direction: column;
  flex: 1; /* ambil sisa tinggi */
  overflow: hidden;
}

.boot-log {
  flex: 1; /* log bisa ambil semua space */
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* hide scroll bar but keep scroll */
.boot-log::-webkit-scrollbar {
  width: 0;
}

.boot-footer {
  flex-shrink: 0; /* jangan mengecil */
  display: flex;
  justify-content: space-between;
  color: #00ff88;
  margin-top: 4px;
}

/* Profile App */
.profile-app {
  font-size: 8px;
  color: #000;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  border: 2px solid #555;
  background: #fff;
}

.profile-name {
  font-size: 10px;
  margin: 0;
}

.profile-role {
  margin: 2px 0 0;
  opacity: 0.7;
}

.profile-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

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

.stat .icon {
  font-size: 10px;
}

.profile-bio {
  margin-bottom: 12px;
  line-height: 1.4;
}

.profile-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.skill {
  padding: 4px 6px;
  border: 2px solid #555;
  background: #e0e0e0;
}

.profile-actions {
  display: flex;
  gap: 8px;
}

.profile-actions button {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 6px 8px;
  border: 2px solid #555;
  background: #c0c0c0;
  cursor: pointer;
}

.profile-section {
  margin-bottom: 12px;
}

.section-title {
  font-size: 9px;
  margin-bottom: 6px;
  border-bottom: 2px solid #555;
  padding-bottom: 2px;
}

.exp-item {
  margin-bottom: 8px;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}

.exp-role {
  font-weight: bold;
}

.exp-company {
  opacity: 0.8;
  margin-bottom: 2px;
}

.exp-desc {
  line-height: 1.4;
  color: #000000a5;
}

.exp-desc.exp-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* expanded */
.exp-desc.exp-expanded {
  display: block;
}

/* toggle button */
.exp-toggle {
  margin-top: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #000;
  cursor: pointer;
  opacity: 0.6;
}

.exp-toggle:hover {
  opacity: 1;
}

.profile-list {
  padding-left: 14px;
  margin: 0;
}

.profile-list li {
  margin-bottom: 4px;
}

.education-item {
  line-height: 1.5;
}

.edu-title {
  font-weight: bold;
}

.edu-school,
.edu-year {
  opacity: 0.7;
}

.profile-subrole {
  margin-top: 2px;
  opacity: 0.6;
}

.profile-section {
  margin-bottom: 14px;
}

.section-title {
  font-size: 9px;
  margin-bottom: 6px;
  border-bottom: 2px solid #555;
  padding-bottom: 2px;
}

.profile-text {
  line-height: 1.5;
}

.profile-list {
  padding-left: 14px;
}

.profile-list li {
  margin-bottom: 4px;
}

.profile-actions .btn {
  text-decoration: none;
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 6px 8px;
  border: 2px solid #555;
  background: #c0c0c0;
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-list li {
  margin-bottom: 6px;
}

.social-list a {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #000;
  text-decoration: none;
  opacity: 0.8;
}

.social-list a:hover {
  opacity: 1;
  text-decoration: underline;
}

.social-list a {
  position: relative;
  padding-left: 12px;
}

/* caret animation effect */
.social-list a::before {
  content: '▶';
  position: absolute;
  left: 0;
  opacity: 0.4;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

/* hover = active menu */
.social-list a:hover::before {
  transform: translateX(2px);
  opacity: 1;
}

/* subtle focus (keyboard friendly) */
.social-list a:focus-visible {
  outline: none;
  text-decoration: underline;
}

/* project app */
/* BASE */
.projects-app {
  font-size: 8px;
}

.project-detail {
  max-width: 720px;
}

/* VIEW STATE */
.projects-menu,
.project-detail {
  display: none;
}

.projects-menu.active,
.project-detail.active {
  display: block;
}

/* HEADER */
.projects-header {
  margin-bottom: 20px;
}

.projects-header h1 {
  font-size: 12px;
  margin-bottom: 6px;
}

.projects-header p {
  opacity: 0.7;
  max-width: 320px;
}

/* FILTER */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  /* max-width: 640px;  */
}

.filter-btn {
  white-space: nowrap;
  user-select: none;
  padding: 4px 8px;
  cursor: pointer;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  font-size: 7px;
}

.filter-btn.active {
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #a0a0a0;
}

/* GRID */
.project-card {
  cursor: pointer;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 3px solid #555;
  display: block;
  background: #000;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px;
  /* max-width: 640px;  */
}

.project-card span {
  display: block;
  margin-top: 6px;
  opacity: 0.8;
}

/* DETAIL */
.back-btn {
  background: none;
  border: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  margin-bottom: 16px;
}

/* HERO */
.project-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: fill;
  max-height: 360px;
}

.project-hero .meta {
  margin-top: 8px;
}

.project-hero h2 {
  font-size: 10px;
  margin-bottom: 2px;
}

.project-hero span {
  opacity: 0.6;
}

/* OVERVIEW */
.project-overview {
  margin: 16px 0;
  line-height: 1.5;
  opacity: 0.85;
}

/* GALLERY */
.project-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.project-gallery img {
  width: 100%;
  border: 2px solid #555;
}

/* TECH */
.project-tech h3 {
  margin-bottom: 6px;
}

.project-tech ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-tech li {
  border: 2px solid #555;
  padding: 3px 5px;
  opacity: 0.8;
}

.project-hero img {
  width: 100%;
  border: 3px solid #555;
}

.hero-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 6px;

  overflow-x: auto;
  overflow-y: hidden;

  padding-bottom: 4px;
  max-width: 100%;

  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #555 #c0c0c0;
}

.hero-thumbs::-webkit-scrollbar {
  height: 6px;
}

.hero-thumbs::-webkit-scrollbar-track {
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}

.hero-thumbs::-webkit-scrollbar-thumb {
  background: #808080;
  border: 1px solid #555;
}

.hero-thumbs img {
  width: 48px;
  height: 32px;
  object-fit: cover;
  cursor: pointer;
  background: #000;

  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;

  opacity: 0.7;
  transition: all 0.1s ease;

  flex-shrink: 0;
}

.hero-thumbs img:hover {
  opacity: 0.9;
}

.hero-thumbs img.active {
  opacity: 1;

  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;

  transform: translateY(1px);
}

/* TAGS */
.project-tags {
  display: flex;
  gap: 6px;
  margin: 4px 0;
}

.tag {
  border: 2px solid #555;
  padding: 2px 4px;
  font-size: 7px;
  opacity: 0.8;
}

.project-header {
  margin-bottom: 12px;
}

.project-header h2 {
  font-size: 11px;
  margin-bottom: 4px;
}

.project-role {
  opacity: 0.6;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  margin-bottom: 16px;

  font-family: 'Press Start 2P', monospace;
  font-size: 7px;

  cursor: pointer;
  background: #c0c0c0;

  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
}

.back-btn:hover {
  background: #d0d0d0;
}

.back-btn:active {
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;

  transform: translateY(1px);
}

.project-info {
  margin-top: 6px;
}

.project-title {
  display: block;
  margin-bottom: 6px;
  opacity: 0.85;
}

/* actions */
.project-actions {
  display: flex;
  gap: 6px;
}

/* button base */
.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 5px 8px;
  cursor: pointer;
  background: #c0c0c0;
  color: #000;
  text-decoration: none;

  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
}

.btn-icon {
  width: 26px;
  padding: 5px 0;
  text-align: center;
}

.btn:hover {
  background: #d0d0d0;
}

.btn:active {
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(1px);
}

/* ===== TOP BAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 12px;
  z-index: 10000;

  background: #c0c0c0;
  color: #000;

  font-size: 8px;
  font-family: 'Press Start 2P', monospace;

  border-bottom: 2px solid #555;
  box-shadow: inset 0 1px 0 #fff;
}

/* left */
.topbar__left {
  white-space: nowrap;
}

/* center */
.topbar__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 8px;
}

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

.battery-body {
  width: 22px;
  height: 10px;
  border: 2px solid #000;
  background: #c0c0c0;
  position: relative;
}

.battery-level {
  height: 100%;
  width: 50%;
  background: #000;
}

.battery-cap {
  width: 3px;
  height: 6px;
  background: #000;
}

.battery.low .battery-level {
  background: #a00;
}

.battery.charging .battery-level {
  background: #0a0;
}

.net-indicator {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.net-indicator i {
  font-size: 18px; /* sebelumnya terlalu kecil */
  line-height: 1;
  font-size: 20px;
}

.net-indicator:active i {
  transform: translate(1px, 1px);
}

.net-popup {
  position: absolute;
  top: 32px;
  right: 8px;

  background: #c0c0c0;
  color: #000;
  font-size: 6px;

  padding: 6px 8px;
  min-width: 120px;

  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;

  box-shadow: inset -1px -1px 0 #808080;
  z-index: 9999;
}

.net-popup div {
  padding: 2px 0;
  white-space: nowrap;
}

.net-popup.hidden {
  display: none;
}

.latency-good {
  color: #008000;
}

.latency-warn {
  color: #a67c00;
}

.latency-bad {
  color: #a00000;
}

@keyframes trayBlink {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

.tray-blink {
  animation: trayBlink 0.6s linear 2;
}

#latencyChart {
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}

/* certificate-app */

.certificate-app {
  font-size: 8px;
  background: #c0c0c0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cert-toolbar {
  display: flex;
  gap: 12px;
  padding: 4px 6px;
  border-bottom: 2px solid #555;
}

.cert-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.cert-sidebar {
  width: 240px;
  border-right: 2px solid #555;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* sidebar tidak scroll */
  transition: width 0.15s ease;
}

.cert-sidebar {
  position: relative; /* WAJIB */
  min-width: 180px;
  max-width: 420px;
}

/* garis drag */
.cert-sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
}

.cert-sidebar-resizer:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* kalau sidebar collapse, resizer ikut hilang */
.cert-sidebar.collapsed .cert-sidebar-resizer {
  display: none;
}

/* .cert-sidebar.collapsed > * {
  display: none;
} */

.cert-sidebar.collapsed .cert-sidebar-header,
.cert-sidebar.collapsed .cert-sidebar-scroll,
.cert-sidebar.collapsed .cert-sidebar-resizer {
  display: none;
}

.cert-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
}

.cert-sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

.cert-sidebar-scroll::-webkit-scrollbar-track {
  background: #c0c0c0;
}

.cert-sidebar-scroll::-webkit-scrollbar-thumb {
  background: #808080;
  border: 1px solid #555;
}

.cert-sidebar-scroll:hover {
  cursor: pointer;
}

.cert-sidebar.collapsed .cert-sidebar-scroll {
  display: none;
}

.cert-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-viewer {
  flex: 1;
  background: #c0c0c0;
  padding: 0;
  overflow: hidden; /* ⛔ scrollbar */
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-image-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* 🔑 kunci responsif */
  border: 2px solid #555;
  background: #fff;
}

.cert-image img {
  max-width: 100%;
  border: 2px solid #555;
}

.cert-document {
  background: #c0c0c0;
  border: 2px inset #555;
  padding: 8px;
}

.cert-page {
  background: #fff;
  padding: 8px;
  border: 2px inset #aaa;
}

.cert-page img {
  max-width: 100%;
  display: block;
}

.cert-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.5vh, 12px);

  color: #333;
  opacity: 0.85;
  text-align: center;

  pointer-events: none;
}

.cert-placeholder img.gif {
  width: clamp(48px, 12vw, 96px);
  height: auto;
  max-height: 40vh;

  object-fit: contain;
  image-rendering: pixelated;
}

.placeholder-text {
  font-size: clamp(6.5px, 0.6vw, 8.5px);
  max-width: 70%;
  line-height: 1.3;
  opacity: 0.75;
}

.cert-tabs {
  display: flex;
  flex-wrap: nowrap; /* ⛔ jangan turun */
  overflow-x: auto; /* ✅ scroll horizontal */
  overflow-y: hidden;
  white-space: nowrap;
  padding: 4px;
  border-bottom: 2px solid #555;
  background: #c0c0c0;
  flex-shrink: 0;
}

.cert-tabs::-webkit-scrollbar {
  height: 5px;
}
.cert-tabs:hover {
  cursor: pointer;
}

.cert-tabs::-webkit-scrollbar-thumb {
  background: #808080;
  border: 1px solid #555;
}

.cert-tab {
  flex: 0 0 auto; /* 🔑 jangan mengecil */
}

.cert-tab {
  padding: 4px 8px;
  cursor: pointer;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  font-size: 7px;
}

.cert-tab.active {
  background: #fff;
  border-bottom: 2px solid #fff;
}

.cert-tab span {
  margin-left: 6px;
  opacity: 0.6;
  cursor: pointer;
}

.cert-editor {
  padding: 8px;
  background: #808080;
  overflow: auto;
}

.cert-editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cert-activity {
  width: 40px;
  background: #c0c0c0;
  border-right: 2px solid #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  padding-right: 10px;
}

.activity-icon {
  font-size: 16px;
  cursor: pointer;
  color: #000;
  user-select: none;
  margin-bottom: 6px;
}

.activity-icon:hover {
  color: #444;
}

.activity-icon:active {
  color: #000080;
}

.cert-sidebar {
  width: 260px;
  transition: width 0.15s ease;
  overflow: hidden;
}

.cert-sidebar.collapsed {
  display: none;
}


.cert-activity button img {
  width: 16px;
  height: 16px;
}

.cert-sidebar-header {
  height: 22px;
  background: #c0c0c0;
  /* border-bottom: 2px solid #555; */
  padding: 2px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 7px;
}

.cert-sidebar-actions {
  display: flex;
  gap: 4px;
}

.action-icon {
  font-size: 14px;
  cursor: pointer;
  color: #000; /* warna icon bisa diganti */
  user-select: none;
}

.action-icon:hover {
  color: #444; /* hover efek subtle */
}

.action-icon:active {
  color: #000080; /* efek klik */
}

.cert-sidebar-actions img {
  width: 12px;
  height: 12px;
  cursor: pointer;
  margin-left: 4px;
}

.cert-folder {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
}

.folder-toggle img {
  width: 10px;
  height: 10px;
  cursor: pointer;
}

.cert-sidebar li {
  width: 100%;
  min-width: 0;
  padding: 1px 4px;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  font-family: monospace;
  min-height: 14px;
}

.cert-sidebar li.active {
  background: #000080;
  color: #fff;
}

.cert-sidebar li:hover {
  background: #808080;
  color: #fff;
}

.cert-sidebar li img {
  margin-right: 4px;
}

.cert-file {
  display: contents;
}

.tree-icon {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.tree-content {
  display: inline-flex;
  align-items: center; /* 🔑 ICON + TEXT TENGAH */
  gap: 4px;
  line-height: 1;
}

.tree-content {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0; /* 🔑 WAJIB untuk ellipsis di flex */
}

.tree-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.cert-breadcrumbs {
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 7px;
  background: #c0c0c0;
  /* border-bottom: 2px solid #555; */
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}

.cert-breadcrumb {
  cursor: pointer;
}

.cert-breadcrumb:hover {
  text-decoration: underline;
}

.cert-breadcrumb-sep {
  opacity: 0.5;
}

.cert-viewer .cert-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 2px inset #fff;
  display: block;
  margin: auto;
}
