/* OCR Results — file listing page */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1c2333;
  --muted: #6b7488;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e3e7f0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .06);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

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

.topbar {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  padding: 34px 0 30px;
  box-shadow: var(--shadow);
}
.topbar-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.topbar h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.subtitle { margin-top: 6px; font-size: .95rem; opacity: .88; }

.badge {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}

main { padding: 28px 0 60px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
#search {
  flex: 1;
  min-width: 220px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .95rem;
  background: var(--card);
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.meta { color: var(--muted); font-size: .82rem; }

.file-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.file-row:hover { transform: translateY(-2px); border-color: #c7d2fe; }

.file-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name {
  color: var(--ink);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  word-break: break-all;
}
.file-name:hover { color: var(--accent); text-decoration: underline; }
.file-meta { color: var(--muted); font-size: .8rem; margin-top: 2px; }

.btn-download {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background .15s ease;
}
.btn-download:hover { background: var(--accent-dark); }

.footer {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
}

/* Breadcrumb navigasi folder */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-bottom: 14px;
  font-size: .85rem;
}
.crumbs a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  transition: background .12s ease;
}
.crumbs a:hover { background: #eef2ff; text-decoration: underline; }
.crumbs .sep { color: var(--muted); user-select: none; }
.crumbs .current {
  color: var(--muted);
  font-weight: 600;
  padding: 3px 8px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Folder row */
.folder-row { cursor: pointer; }
.folder-row:hover { transform: translateY(-2px); border-color: #bbf7d0; }
.folder-row .file-icon { filter: none; }

/* Status / empty state / error */
.status {
  text-align: center;
  padding: 44px 0;
  color: var(--muted);
  font-size: .95rem;
}
.status.error { color: #b91c1c; }

@media (max-width: 560px) {
  .topbar { padding: 26px 0 22px; }
  .topbar h1 { font-size: 1.35rem; }
  .badge { display: none; }
  .file-row { padding: 12px 14px; gap: 10px; }
  .btn-download { padding: 8px 14px; font-size: .8rem; }
  .crumbs .current { max-width: 160px; }
}
