.dfv-app {
  --dfv-bg: #ffffff;
  --dfv-panel: #111827;
  --dfv-text: #15171d;
  --dfv-muted: #667085;
  --dfv-border: #e4e7ec;
  --dfv-soft: #f7f8fb;
  --dfv-primary: #4f46e5;
  --dfv-primary-dark: #4338ca;
  --dfv-success: #15803d;
  --dfv-error: #b42318;
  width: 100%;
  color: var(--dfv-text);
  font-family: inherit;
  box-sizing: border-box;
}

.dfv-app *, .dfv-app *::before, .dfv-app *::after { box-sizing: border-box; }
.dfv-app button, .dfv-app input { font: inherit; }
.dfv-app [hidden] { display: none !important; }

.dfv-card {
  background: var(--dfv-bg);
  border: 1px solid var(--dfv-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 35px rgba(16, 24, 40, .07);
}

.dfv-dropzone {
  min-height: 225px;
  border: 2px dashed #cfd4dc;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
  outline: none;
}

.dfv-dropzone:hover,
.dfv-dropzone:focus,
.dfv-dropzone:focus-within,
.dfv-dropzone.is-dragging {
  border-color: var(--dfv-primary);
  background: #f7f7ff;
}

.dfv-dropzone.is-dragging { transform: scale(.997); }
.dfv-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.dfv-upload-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #eef0ff;
  color: var(--dfv-primary);
  font-size: 30px;
  font-weight: 700;
}

.dfv-upload-title { font-size: 19px; font-weight: 750; }
.dfv-upload-subtitle { margin-top: 4px; color: var(--dfv-muted); }
.dfv-privacy { max-width: 650px; margin-top: 14px; color: var(--dfv-muted); font-size: 12.5px; line-height: 1.5; }

.dfv-status {
  min-height: 26px;
  padding: 9px 2px 0;
  color: var(--dfv-muted);
  font-size: 13px;
}
.dfv-status.is-success { color: var(--dfv-success); }
.dfv-status.is-error { color: var(--dfv-error); }

.dfv-workspace { margin-top: 2px; }
.dfv-filebar, .dfv-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dfv-filebar { padding: 10px 0 14px; border-bottom: 1px solid var(--dfv-border); }
.dfv-file-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dfv-file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.dfv-file-info span { color: var(--dfv-muted); font-size: 12.5px; line-height: 1.45; }

.dfv-icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--dfv-border);
  border-radius: 9px;
  background: #fff;
  color: #475467;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.dfv-icon-btn:hover { background: var(--dfv-soft); }

.dfv-controls { padding: 14px 0; flex-wrap: wrap; }
.dfv-tabs, .dfv-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.dfv-tab, .dfv-btn {
  min-height: 38px;
  border: 1px solid var(--dfv-border);
  border-radius: 9px;
  padding: 8px 12px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.dfv-tab:hover, .dfv-btn:hover { background: var(--dfv-soft); }
.dfv-tab.is-active { background: #eef0ff; border-color: #c7d0ff; color: var(--dfv-primary-dark); }
.dfv-btn-primary { background: var(--dfv-primary); border-color: var(--dfv-primary); color: #fff; }
.dfv-btn-primary:hover { background: var(--dfv-primary-dark); border-color: var(--dfv-primary-dark); }

.dfv-search { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; }
.dfv-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--dfv-border);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fff;
  color: var(--dfv-text);
  outline: none;
}
.dfv-search input:focus { border-color: var(--dfv-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.dfv-search span { color: var(--dfv-muted); font-size: 12.5px; white-space: nowrap; }

.dfv-viewer {
  min-height: 430px;
  max-height: 650px;
  overflow: auto;
  border-radius: 12px;
  background: var(--dfv-panel);
  outline: none;
}
.dfv-viewer:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, .2); }

.dfv-empty, .dfv-message {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  color: #98a2b3;
}
.dfv-empty strong { color: #818cf8; font-size: 52px; line-height: 1; letter-spacing: -.05em; }
.dfv-message strong { color: #f2f4f7; font-size: 16px; }
.dfv-message span { max-width: 560px; line-height: 1.6; }

.dfv-pre {
  min-width: 100%;
  margin: 0;
  padding: 20px;
  color: #e5e7eb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.dfv-pre mark { padding: 0 1px; border-radius: 2px; background: #fde68a; color: #111827; }

.dfv-table-wrap { overflow: auto; }
.dfv-viewer table { width: 100%; border-collapse: collapse; color: #e5e7eb; font-size: 13px; }
.dfv-viewer th, .dfv-viewer td { padding: 10px 12px; border-bottom: 1px solid #374151; text-align: left; white-space: nowrap; }
.dfv-viewer th { position: sticky; top: 0; z-index: 1; background: #1f2937; color: #fff; font-weight: 700; }
.dfv-viewer tr:hover td { background: rgba(255,255,255,.025); }

.dfv-hex { min-width: 860px; padding: 14px 16px; color: #d0d5dd; font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.dfv-hex-head, .dfv-hex-row { display: grid; grid-template-columns: 88px 390px minmax(130px, 1fr); gap: 14px; }
.dfv-hex-head { position: sticky; top: 0; z-index: 1; padding: 5px 0 9px; border-bottom: 1px solid #344054; background: var(--dfv-panel); color: #98a2b3; }
.dfv-hex-row > span { color: #818cf8; }
.dfv-hex code { color: inherit; background: transparent; padding: 0; font: inherit; }

.dfv-limit-note { padding: 10px 15px; border-top: 1px solid #344054; color: #fdb022; background: #111827; font-size: 12.5px; }
.dfv-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 720px) {
  .dfv-card { padding: 12px; border-radius: 14px; }
  .dfv-dropzone { min-height: 200px; padding: 22px 16px; }
  .dfv-filebar, .dfv-controls { align-items: flex-start; }
  .dfv-controls { flex-direction: column; }
  .dfv-tabs, .dfv-actions { width: 100%; }
  .dfv-tab { flex: 1; }
  .dfv-actions .dfv-btn { flex: 1 1 calc(33.333% - 6px); }
  .dfv-viewer { min-height: 360px; max-height: 560px; }
  .dfv-empty, .dfv-message { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .dfv-app * { scroll-behavior: auto !important; transition: none !important; }
}
