:root {
  color-scheme: dark;
  --bg: #0c1722;
  --bg-soft: #122837;
  --surface: rgba(22, 36, 48, 0.78);
  --surface-blue: rgba(31, 50, 64, 0.72);
  --text: #f5fdff;
  --text-dim: #b9c6d1;
  --muted: #7e8d99;
  --line: rgba(245, 253, 255, 0.12);
  --line-strong: rgba(245, 253, 255, 0.24);
  --primary: #54c9ec;
  --primary-strong: #4edeff;
  --primary-dark: #f5fdff;
  --cyan: #4edeff;
  --ok: #00bb7f;
  --warn: #ffb547;
  --danger: #fb2c36;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  font-family:
    "IBM Plex Sans Arabic", Tajawal, Inter, ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(78, 222, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 222, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 48% 24%, rgba(78, 222, 255, 0.12), transparent 34rem),
    linear-gradient(180deg, #0c1722 0%, #0a1620 58%, #0c1722 100%);
  background-size:
    64px 64px,
    64px 64px,
    auto,
    auto;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.files-mode {
  color-scheme: dark;
  background:
    linear-gradient(rgba(78, 222, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 222, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 48% 24%, rgba(78, 222, 255, 0.12), transparent 34rem),
    linear-gradient(180deg, #0c1722 0%, #0a1620 58%, #0c1722 100%);
  background-size:
    64px 64px,
    64px 64px,
    auto,
    auto;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(1440px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 56px;
}

.files-view {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 42px 0 64px;
  color: var(--text);
}

.files-brand-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 30px;
}

.files-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.files-eyebrow {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 900;
}

.files-view h1 {
  color: var(--text);
  font-size: clamp(2.35rem, 4vw, 3.75rem);
  line-height: 1.08;
  font-weight: 950;
}

.files-subtitle {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 1.08rem;
  font-weight: 650;
}

.files-add-button {
  min-height: 48px;
  border: 1px solid rgba(78, 222, 255, 0.42);
  border-radius: var(--radius-sm);
  background: rgba(84, 201, 236, 0.18);
  color: #ffffff;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(84, 201, 236, 0.14);
}

.files-add-button:hover {
  background: rgba(84, 201, 236, 0.28);
}

.files-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  min-height: 112px;
  border: 1px solid rgba(245, 253, 255, 0.12);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px;
  display: grid;
  align-content: space-between;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.stat-card span {
  color: var(--text-dim);
  font-weight: 750;
}

.stat-card strong {
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  font-weight: 950;
}

.files-table-panel {
  border: 1px solid rgba(245, 253, 255, 0.12);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.files-table-panel h2 {
  margin-bottom: 22px;
  color: var(--text);
  text-align: right;
}

.files-table-wrap {
  overflow: auto;
  border: 1px solid rgba(245, 253, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(7, 17, 25, 0.78);
}

.files-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(7, 17, 25, 0.78);
  color: var(--text);
}

.files-table th,
.files-table td {
  border-bottom: 1px solid rgba(245, 253, 255, 0.12);
  padding: 18px 20px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.files-table th {
  background: rgba(84, 201, 236, 0.12);
  color: var(--text);
  font-weight: 950;
}

.files-table tr:last-child td {
  border-bottom: 0;
}

.file-link {
  background: transparent;
  color: var(--primary-strong);
  cursor: pointer;
  padding: 0;
  font-weight: 900;
  text-align: right;
}

.file-link:hover {
  text-decoration: underline;
}

.file-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 0.92rem;
  font-weight: 900;
}

.file-status.ready {
  background: rgba(84, 201, 236, 0.14);
  color: #b8f0ff;
}

.file-status.queued {
  background: rgba(84, 201, 236, 0.14);
  color: #b8f0ff;
}

.file-status.processing {
  background: rgba(255, 181, 71, 0.16);
  color: #ffd28b;
}

.file-status.completed {
  background: rgba(0, 187, 127, 0.16);
  color: #91f2ce;
}

.file-status.failed {
  background: rgba(251, 44, 54, 0.16);
  color: #ff9ca1;
}

.file-actions-cell {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  direction: ltr;
}

.file-action-button,
.file-rescan-button,
.file-delete-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
}

.file-action-button {
  background: #54c9ec;
  color: #ffffff;
}

.file-rescan-button {
  border: 1px solid rgba(255, 181, 71, 0.5);
  background: rgba(255, 181, 71, 0.12);
  color: #ffd28b;
}

.file-delete-button {
  border: 1px solid rgba(251, 44, 54, 0.42);
  background: rgba(251, 44, 54, 0.12);
  color: #ff9ca1;
}

.empty-files-cell {
  color: var(--text-dim);
  text-align: center !important;
  padding: 42px !important;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 18px;
}

.secondary-button {
  min-height: 44px;
  border: 1px solid rgba(245, 253, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(245, 253, 255, 0.08);
  color: var(--text);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 900;
}

.secondary-button:hover {
  background: rgba(245, 253, 255, 0.14);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(78, 222, 255, 0.42);
  background: rgba(84, 201, 236, 0.16);
  box-shadow: 0 14px 30px rgba(84, 201, 236, 0.12);
}

.back-button:hover {
  background: rgba(84, 201, 236, 0.26);
}

.back-button span {
  font-size: 1.25rem;
  line-height: 1;
}

.topbar {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 6px;
}

.modal-close-button:focus-visible,
.preview-toolbar button:focus-visible,
.primary-button:focus-visible {
  outline: 4px solid rgba(78, 222, 255, 0.24);
  outline-offset: 2px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 14px;
  min-width: 0;
  color: #f5fdff;
  direction: rtl;
}

.baseer-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.brand-name {
  display: grid;
  gap: 0;
  text-align: right;
  direction: rtl;
  line-height: 1;
}

.brand-name strong {
  color: #f5fdff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.beta-pill {
  align-self: center;
  border-radius: 8px;
  background: #399bb9;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 0.9rem;
  font-weight: 800;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
}

.tab-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(245, 253, 255, 0.18);
  border-radius: 999px;
  background: rgba(245, 253, 255, 0.035);
  color: var(--text-dim);
  cursor: default;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(245, 253, 255, 0.02);
}

.tab-button.active {
  border-color: rgba(78, 222, 255, 0.5);
  background: rgba(84, 201, 236, 0.18);
  color: #f5fdff;
}

.tab-button:disabled {
  opacity: 0.55;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  position: relative;
  max-width: 940px;
  color: var(--text);
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 950;
}

h1 span {
  color: #4edeff;
}

h2 {
  color: var(--text);
  font-size: clamp(1.4rem, 1.8vw, 1.85rem);
  line-height: 1.2;
  font-weight: 950;
}

#modelLabel {
  position: relative;
  margin-top: 12px;
  color: var(--text-dim);
  direction: ltr;
  text-align: right;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 650;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  min-width: 76px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(0, 187, 127, 0.16);
  color: #91f2ce;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 950;
  z-index: 1;
}

.badge.error {
  background: rgba(251, 44, 54, 0.16);
  color: #ff9ca1;
}

.badge.busy {
  background: rgba(255, 181, 71, 0.16);
  color: #ffd28b;
}

.workspace-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(245, 253, 255, 0.12);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.panel-header,
.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.input-panel {
  display: grid;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.field-label {
  display: grid;
  gap: 9px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
}

select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(245, 253, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(7, 17, 25, 0.78);
  color: var(--text);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 850;
  direction: ltr;
}

select:focus {
  outline: 4px solid rgba(78, 222, 255, 0.22);
  border-color: var(--primary);
}

.drop-zone {
  min-height: 218px;
  border: 1.5px dashed rgba(245, 253, 255, 0.22);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 20%, rgba(78, 222, 255, 0.12), transparent 16rem),
    rgba(10, 24, 34, 0.72);
  color: var(--text);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(18, 40, 55, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(19, 181, 236, 0.12);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-title {
  display: block;
  color: var(--text);
  font-weight: 950;
  font-size: 1.35rem;
}

.drop-subtitle {
  display: block;
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.55;
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 10, 16, 0.72);
  backdrop-filter: blur(10px);
}

.modal-panel {
  width: min(720px, 100%);
  border: 1px solid rgba(245, 253, 255, 0.14);
  border-radius: var(--radius-lg);
  background: #122837;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-close-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(245, 253, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(245, 253, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-close-button:hover {
  background: rgba(245, 253, 255, 0.14);
}

.modal-drop-zone {
  min-height: 300px;
}

body.modal-open {
  overflow: hidden;
}

.preview-panel {
  display: grid;
  gap: 10px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  flex-wrap: wrap;
}

.preview-toolbar button {
  min-width: 42px;
  height: 38px;
  border: 1px solid rgba(245, 253, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(245, 253, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 950;
}

.preview-toolbar button:hover:not(:disabled) {
  background: rgba(245, 253, 255, 0.14);
}

#zoomFitButton {
  min-width: 58px;
}

.zoom-label {
  min-width: 54px;
  color: var(--text-dim);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 900;
}

.pan-controls {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.preview-wrap {
  border: 1px solid rgba(245, 253, 255, 0.14);
  border-radius: var(--radius-md);
  overflow: auto;
  background: rgba(7, 17, 25, 0.78);
  min-height: 520px;
  max-height: calc(100vh - 320px);
  display: grid;
  place-items: center;
  padding: 14px;
  direction: ltr;
  overscroll-behavior: contain;
  cursor: grab;
  touch-action: none;
}

.preview-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  user-select: none;
}

.preview-wrap img[hidden],
.preview-wrap img:not([src]),
.pdf-preview[hidden] {
  display: none !important;
}

.pdf-preview {
  width: 100%;
  min-height: 760px;
  height: min(78vh, 920px);
  border: 0;
  border-radius: var(--radius-sm);
  background: #071119;
}

.preview-wrap.is-panning {
  cursor: grabbing;
}

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.primary-button {
  min-height: 58px;
  border-radius: var(--radius-sm);
  background: #54c9ec;
  color: #ffffff;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 950;
  font-size: 1.05rem;
  box-shadow: 0 16px 36px rgba(84, 201, 236, 0.2);
}

.primary-button:hover:not(:disabled) {
  background: #6dd9f7;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

#copyButton,
#toggleRawButton {
  min-height: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(245, 253, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(245, 253, 255, 0.12);
  padding: 0 16px;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 950;
}

#copyButton:hover:not(:disabled),
#toggleRawButton:hover:not(:disabled) {
  background: rgba(245, 253, 255, 0.14);
}

.output-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
}

.markdown-output,
.raw-output {
  margin: 0;
  min-height: 660px;
  max-height: calc(100vh - 340px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  line-height: 1.75;
  font-size: 1rem;
}

.structured-output {
  border: 1px solid rgba(84, 201, 236, 0.22);
  border-radius: var(--radius-md);
  background: rgba(7, 17, 25, 0.84);
  overflow: hidden;
}

.structured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(245, 253, 255, 0.12);
  background: rgba(84, 201, 236, 0.1);
}

.structured-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 950;
}

.structured-header p {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 750;
}

.structured-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.structured-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  color: var(--text);
}

.structured-table th,
.structured-table td {
  border-bottom: 1px solid rgba(245, 253, 255, 0.1);
  padding: 13px 14px;
  text-align: right;
  vertical-align: top;
}

.structured-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #102534;
  color: var(--text);
  font-weight: 950;
}

.structured-table td {
  color: #e8f2f8;
  font-weight: 700;
}

.structured-table td strong,
.structured-table td span {
  display: block;
}

.structured-table td span {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 650;
}

.structured-value {
  direction: ltr;
  text-align: left !important;
  color: #b8f0ff !important;
  font-weight: 950 !important;
  white-space: nowrap;
}

.markdown-output {
  background: rgba(7, 17, 25, 0.78);
  color: var(--text);
  min-width: 0;
  unicode-bidi: plaintext;
  overflow-x: auto;
  overflow-y: auto;
}

.markdown-output p,
.markdown-output li,
.markdown-output blockquote {
  overflow-wrap: anywhere;
}

.markdown-output[dir="rtl"],
.raw-output[dir="rtl"] {
  text-align: right;
}

.markdown-output[dir="ltr"],
.raw-output[dir="ltr"] {
  text-align: left;
}

.markdown-output > :first-child {
  margin-top: 0;
}

.markdown-output > :last-child {
  margin-bottom: 0;
}

.markdown-output h1,
.markdown-output h2,
.markdown-output h3,
.markdown-output h4 {
  margin: 1.25em 0 0.55em;
  color: var(--primary-dark);
  line-height: 1.25;
  font-weight: 950;
}

.markdown-output h1 {
  font-size: 1.65rem;
}

.markdown-output h2 {
  font-size: 1.38rem;
}

.markdown-output h3 {
  font-size: 1.15rem;
}

.markdown-output p,
.markdown-output ul,
.markdown-output ol,
.markdown-output blockquote,
.markdown-output table,
.markdown-output pre {
  margin: 0 0 1em;
}

.markdown-output table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  border-collapse: collapse;
  table-layout: auto;
  direction: inherit;
  display: table;
}

.markdown-output table[dir="rtl"] {
  direction: rtl;
}

.markdown-output th,
.markdown-output td {
  border: 1px solid rgba(245, 253, 255, 0.14);
  padding: 10px 12px;
  text-align: start;
  vertical-align: top;
  min-width: 86px;
  overflow-wrap: normal;
  word-break: keep-all;
  unicode-bidi: plaintext;
}

.markdown-output th {
  white-space: normal;
}

.markdown-output td {
  white-space: nowrap;
}

.markdown-output th {
  background: rgba(84, 201, 236, 0.12);
  color: var(--text);
  font-weight: 950;
}

.markdown-output td {
  color: #e8f2f8;
}

.markdown-output code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: rgba(245, 253, 255, 0.1);
  border-radius: 5px;
  padding: 0.12em 0.35em;
}

.markdown-output pre,
.raw-output {
  white-space: pre-wrap;
  word-break: break-word;
  background: #071119;
  color: #f5fdff;
}

.markdown-output pre {
  overflow: auto;
  border-radius: var(--radius-sm);
  padding: 16px;
}

.markdown-output pre code {
  background: transparent;
  padding: 0;
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100% - 28px, 760px);
    padding: 20px 0 40px;
  }

  .files-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .files-add-button {
    align-self: flex-start;
  }

  .files-stats {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 16px;
    padding-left: 0;
  }

  .brand-lockup {
    justify-content: space-between;
  }

  .tabs {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tab-button {
    flex: 0 0 auto;
  }

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

  .badge {
    justify-self: flex-start;
  }

  .markdown-output,
  .raw-output {
    max-height: none;
    min-height: 360px;
  }

  .preview-wrap {
    min-height: 420px;
    max-height: 70vh;
  }
}

@media (max-width: 560px) {
  .files-view {
    padding-top: 24px;
  }

  .files-table-panel {
    padding: 18px;
  }

  .files-view h1 {
    font-size: 2.25rem;
  }

  .baseer-mark {
    width: 52px;
    height: 52px;
  }

  .brand-name strong {
    font-size: 1.05rem;
  }

  .panel {
    padding: 18px;
  }

  .panel-header,
  .output-header {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-overlay {
    padding: 14px;
  }

  .modal-panel {
    padding: 18px;
  }

  .modal-drop-zone {
    min-height: 240px;
  }

  .preview-toolbar {
    gap: 6px;
  }

  .preview-toolbar button {
    min-width: 38px;
  }

  .pan-controls {
    margin-left: 0;
  }

  .preview-wrap {
    min-height: 340px;
  }
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .files-view,
  .topbar,
  .statusBadge,
  #statusBadge,
  .input-panel,
  .output-actions,
  .modal-overlay {
    display: none !important;
  }

  .app-shell,
  .workspace-grid,
  .output-panel,
  .markdown-output {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    overflow: visible !important;
  }

  .markdown-output * {
    color: #000000 !important;
  }
}
