/* ==========================================================================
   Pandoc Web Converter - Stylesheet
   Design: Modern Clean Dark Theme, System CJK Typography, Mobile Responsive
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;

  /* Color Palette */
  --bg-app: #0b0f17;
  --bg-card: #131b2a;
  --bg-card-secondary: #1a2336;
  --bg-input: #0f172a;
  --border-color: #27354d;
  --border-subtle: #1e293b;
  --border-focus: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Brand Accents */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-active: #4338ca;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.35);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 3rem 1rem;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.app-container {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.25rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color: #ffffff;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.header-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.header-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.header-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background-color: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--text-dim);
}

.status-badge.online .status-dot {
  background-color: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-badge.offline .status-dot {
  background-color: var(--danger);
}

.status-badge.checking .status-dot {
  background-color: #f59e0b;
}

/* PIN toggle */
.pin-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pin-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.pin-toggle-btn.has-pin {
  border-color: var(--success);
  color: var(--success);
}

/* PIN Banner */
.pin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  animation: fadeIn 0.2s ease-out;
}

.pin-panel-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pin-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pin-info svg {
  color: var(--primary);
  flex-shrink: 0;
}

.pin-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pin-input-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  width: 170px;
}

.pin-input-group input:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Main Card */
.main-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Tabs */
.tabs-nav {
  display: flex;
  background-color: var(--bg-card-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg-card);
}

/* Tab panes */
.tab-content {
  padding: 1.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.4);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.dropzone:hover, .dropzone.dragover, .dropzone:focus-visible {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.file-picker-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  color: var(--primary);
  margin-bottom: 0.85rem;
  transition: transform 0.2s ease;
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-3px);
}

.dropzone-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.dropzone-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.dropzone-limits {
  margin-top: 1rem;
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--bg-card-secondary);
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
}

/* Uploaded Files List */
.file-list-container {
  margin-top: 1.25rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.file-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.file-list-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.file-list-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-total-size {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.file-item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.file-item-name {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.file-item-size {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.file-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.file-remove-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* Text Editor */
.text-editor-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.text-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-editor-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.text-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.text-stats-badge {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.text-editor {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 1rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 220px;
}

.text-editor:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Controls Section */
.controls-section {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.url-panel-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.url-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.url-controls-row {
  max-width: 320px;
}

.form-label-sm {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.label-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Select wrapper */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* PDF Engine Selector Card */
.pdf-engine-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fadeIn 0.2s ease-out;
}

.pdf-engine-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

.engine-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.engine-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.engine-radio-label:hover {
  border-color: var(--border-color);
}

.engine-radio-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.engine-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.engine-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.engine-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Badges */
.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.badge-secondary {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

/* Options Details */
.options-details {
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.options-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.options-summary:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-chevron {
  transition: transform 0.2s ease;
}

.options-details[open] .summary-chevron {
  transform: rotate(180deg);
}

.options-body {
  padding: 1rem 1rem 1.25rem 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Checkbox Grid */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Metadata Grid */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.form-input-sm {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.form-input-sm:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Reference Docx Card */
.ref-docx-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.ref-docx-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ref-docx-filename {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.hidden-file-input {
  display: none;
}

/* Action Footer */
.action-footer {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-large {
  padding: 0.85rem 2.5rem;
  font-size: 1.05rem;
  width: 100%;
  max-width: 360px;
}

.btn-secondary {
  background: var(--bg-card-secondary);
  border-color: var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.35rem 0.6rem;
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

.btn-download {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  padding: 0.75rem 1.85rem;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-kbd-hint {
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: #e0e7ff;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Feedback Section */
.feedback-section {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Success Card */
.result-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slideUp 0.25s ease-out;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.result-icon-wrapper {
  padding: 0.65rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-icon-wrapper.success {
  background: var(--success-bg);
  color: var(--success);
}

.result-icon-wrapper.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.result-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.result-filename {
  font-weight: 600;
  color: #a7f3d0;
  font-family: var(--font-mono);
}

.result-separator {
  color: var(--text-dim);
}

/* Error Panel */
.error-panel {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideUp 0.25s ease-out;
}

.error-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.error-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fca5a5;
}

.error-message {
  font-size: 0.88rem;
  color: #fee2e2;
  margin-top: 0.25rem;
}

.stderr-box {
  background: #000000;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stderr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem;
  background: rgba(239, 68, 68, 0.15);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fca5a5;
}

.stderr-content {
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #f87171;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow-y: auto;
}

/* Footer */
.app-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0 1rem;
}

.footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  body {
    padding: 1rem 0.5rem 2rem 0.5rem;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-status {
    width: 100%;
    justify-content: space-between;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .engine-options {
    grid-template-columns: 1fr;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-actions {
    width: 100%;
  }

  .btn-download {
    width: 100%;
  }

  .pin-input-group {
    width: 100%;
  }

  .pin-input-group input {
    flex: 1;
  }
}

/* PDF engine radio that the server reports as not installed */
.engine-radio-label.engine-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}
.engine-radio-label.engine-unavailable input {
  cursor: not-allowed;
}
.badge-unavailable {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
