/* ═══════════════════════════════════════════════════════════════════
   BBC Micro Disk Editor – Retro Phosphor UI
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --bg:         #0a100a;
  --bg-panel:   #0e150e;
  --bg-cell:    #121a12;
  --border:     #256b25;
  --border-hi:  #3ec83e;
  --green:      #00f050;
  --green-dim:  #00bb40;
  --green-hi:   #ccffcc;
  --amber:      #ffbb00;
  --amber-dim:  #aa6600;
  --red:        #ff4444;
  --cyan:       #00ddee;
  --white:      #ddf0dd;
  --grey:       #446044;
  --font:       'Share Tech Mono', 'Courier New', monospace;
  --scan-gap:   3px;
}

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

html, body {
  height: 100%;
  background: #040804;
  color: var(--green);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}

/* CRT scanline overlay – subtle, 5% opacity */
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent calc(var(--scan-gap) - 1px),
    rgba(0,0,0,0.05) calc(var(--scan-gap) - 1px),
    rgba(0,0,0,0.05) var(--scan-gap)
  );
  z-index: 9999;
}

/* Subtle vignette */
body::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 65%, rgba(0,0,0,0.38) 100%);
  z-index: 9998;
}

/* ── Layout ──────────────────────────────────────────────────────── */

#root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Title bar */
#titlebar {
  background: var(--green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 12px;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: bold;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(0,220,80,0.8);
  border-bottom: 2px solid var(--border-hi);
  position: relative;
}

#titlebar span {
  opacity: 0.65;
  font-size: 11px;
  letter-spacing: 1px;
}

.btn-titlebar {
  position: absolute;
  right: 10px;
  background: rgba(0,0,0,0.15) !important;
  border-color: rgba(0,0,0,0.3) !important;
  color: #000 !important;
  font-size: 10px !important;
  padding: 1px 7px !important;
}
.btn-titlebar:hover {
  background: rgba(0,0,0,0.35) !important;
  color: #000 !important;
}

/* Status bar */
#statusbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 3px 10px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--green-dim);
  flex-shrink: 0;
}

#statusbar .status-msg { color: var(--amber); flex: 1; }
#statusbar .status-session { color: var(--grey); font-size: 11px; }

/* Main content area */
#workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}

/* Disk panels */
.disk-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  margin: 6px;
  background: var(--bg-panel);
  min-width: 0;
  position: relative;
}

.disk-panel:first-child { margin-right: 3px; }
.disk-panel:last-child  { margin-left:  3px; }

/* Panel header */
.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #0c1c0c;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-slot-badge {
  background: var(--green);
  color: #000;
  font-size: 10px;
  padding: 1px 5px;
  letter-spacing: 1px;
  font-weight: bold;
}

.panel-title {
  flex: 1;
  color: var(--amber);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.panel-format {
  font-size: 11px;
  color: var(--green-dim);
}

/* Per-panel action row (OPEN / SAVE / CLOSE) – always visible */
.panel-actions {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  background: #0b170b;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Disk toolbar (IMPORT / DEL / ZIP / COPY) – visible only when loaded */
.disk-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

.disk-toolbar .side-tabs {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

/* MMB panel */
.mmb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: #0c1a0c;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Catalog area */
.catalog-wrap {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.catalog-wrap::-webkit-scrollbar       { width: 8px; }
.catalog-wrap::-webkit-scrollbar-track { background: #060a06; }
.catalog-wrap::-webkit-scrollbar-thumb { background: var(--border); }

/* Drop overlay */
.catalog-wrap.drag-over::after {
  content: '▼  DROP HERE  ▼';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,100,20,0.75);
  color: var(--green-hi);
  font-size: 18px;
  letter-spacing: 4px;
  border: 3px dashed var(--green-hi);
  z-index: 10;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--green-dim);
  text-align: center;
  gap: 12px;
  padding: 20px;
  user-select: none;
}

.empty-state .big-icon {
  font-size: 48px;
  opacity: 0.4;
}

.empty-state .hint {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.8;
}

/* Catalog table */
.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.catalog-table thead th {
  background: #0b180b;
  color: var(--green-dim);
  font-size: 11px;
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.catalog-table thead th:first-child { padding-left: 6px; }

.catalog-table tbody tr {
  border-bottom: 1px solid #131f13;
  cursor: pointer;
  transition: background 0.08s;
}

.catalog-table tbody tr:hover        { background: #0f230f; }
.catalog-table tbody tr.selected     { background: #113011; outline: 1px solid var(--border-hi); }
.catalog-table tbody tr.selected td  { color: var(--green-hi); }

.catalog-table td {
  padding: 5px 8px;
  white-space: nowrap;
  vertical-align: middle;
}

.catalog-table td:first-child { padding-left: 6px; padding-right: 4px; }

/* Selection checkbox column */
.col-sel { width: 24px; }
.row-cb  { accent-color: var(--green); cursor: pointer; width: 13px; height: 13px; }
.select-all-cb { accent-color: var(--green); cursor: pointer; width: 13px; height: 13px; }

.col-name     { color: var(--white); font-weight: bold; width: 28%; }
.col-dir      { color: var(--cyan);  width: 6%; text-align: center; }
.col-lock     { width: 5%; text-align: center; color: var(--amber); }
.col-load     { color: var(--green-dim); font-size: 12px; }
.col-exec     { color: var(--green-dim); font-size: 12px; }
.col-len      { color: var(--amber-dim); font-size: 12px; text-align: right; }
.col-sector   { color: var(--grey); font-size: 11px; text-align: right; }
.col-actions  { width: 170px; text-align: right; white-space: nowrap; }
.form-tbl td  { padding: 5px 10px 5px 0; vertical-align: middle; }
.form-lbl     { color: var(--green-dim); font-size: 12px; white-space: nowrap; min-width: 90px; }

.lock-icon { font-size: 10px; }
.is-dir    { color: var(--cyan); font-style: italic; }

/* ── ADFS breadcrumb navigation ── */
.adfs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  background: rgba(0,255,0,0.04);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  flex-wrap: wrap;
}
.bc-seg {
  color: var(--amber);
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}
.bc-seg:hover { background: rgba(255,176,0,0.15); }
.bc-root { font-weight: bold; }
.bc-cur  { color: var(--white); cursor: default; font-weight: bold; }
.bc-cur:hover { background: none; }
.bc-sep  { color: var(--green-dim); user-select: none; padding: 0 1px; }

/* ── Directory entry in catalog ── */
.dir-entry-name {
  cursor: pointer;
  color: var(--cyan);
  font-style: italic;
}
.dir-entry-name:hover { text-decoration: underline; color: var(--white); }

/* Action row mini-buttons */
.row-actions {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.1s;
}

.catalog-table tbody tr:hover .row-actions,
.catalog-table tbody tr.selected .row-actions { opacity: 1; }

/* MMB slot list */
.mmb-slot-list {
  overflow-y: auto;
  max-height: 180px;
  border-bottom: 1px solid var(--border);
}

.mmb-slot-item {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid #111811;
  font-size: 12px;
  transition: background 0.07s;
}

.mmb-slot-item:hover    { background: #0f230f; }
.mmb-slot-item.active   { background: #113011; color: var(--green-hi); outline: 1px solid var(--border); }
.mmb-slot-item.empty    { color: var(--grey); }
.mmb-slot-num    { color: var(--green-dim); width: 32px; }
.mmb-slot-name   { flex: 1; color: var(--white); }
.mmb-slot-status { color: var(--grey); font-size: 10px; }

/* Disk stats footer */
.disk-stats {
  padding: 4px 10px;
  font-size: 11px;
  color: var(--green-dim);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.disk-stats .stat-val { color: var(--amber); }

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--green);
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  white-space: nowrap;
}

.btn:hover   { background: var(--green); color: #000; border-color: var(--green-hi); }
.btn:active  { background: var(--green-hi); }
.btn:disabled{ opacity: 0.25; pointer-events: none; }

.btn-amber  { border-color: var(--amber-dim); color: var(--amber); }
.btn-amber:hover { background: var(--amber); color: #000; border-color: var(--amber); }

.btn-red    { border-color: #6a1515; color: var(--red); }
.btn-red:hover { background: var(--red); color: #000; border-color: var(--red); }

.btn-cyan   { border-color: #0a4050; color: var(--cyan); }
.btn-cyan:hover { background: var(--cyan); color: #000; border-color: var(--cyan); }
.btn-purple { border-color: #3d1a6e; color: #bb88ff; }
.btn-purple:hover { background: #bb88ff; color: #000; border-color: #bb88ff; }

.btn-sm     { font-size: 10px; padding: 2px 6px; }

/* Tab buttons */
.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--green-dim);
  font-family: var(--font);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tab-btn.active {
  background: var(--bg-panel);
  color: var(--green);
  border-color: var(--border-hi);
}

/* ── Modal dialogs ───────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-hi);
  min-width: 340px;
  max-width: 520px;
  width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,200,60,0.18);
}

.modal .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
}
.modal-wide {
  max-width: 780px;
}

/* ── File viewer modal ── */
.modal-viewer {
  max-width: 900px;
  width: 95vw;
  height: 82vh;
  display: flex;
  flex-direction: column;
}
.viewer-tabs {
  display: flex;
  gap: 2px;
}
.viewer-tab {
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--green-dim);
  padding: 3px 12px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-family: var(--font);
}
.viewer-tab:hover { border-color: var(--green-dim); color: var(--white); }
.viewer-tab.active { background: var(--green); color: #000; border-color: var(--green); font-weight: bold; }
.viewer-body {
  flex: 1;
  overflow: hidden;
  background: #030b03;
  position: relative;
  border-top: 1px solid var(--border);
}
#viewer-pre {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 12px 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  color: var(--green-hi);
  font-family: var(--font);
  tab-size: 8;
  word-break: normal;
}
/* BASIC syntax colours */
.bln  { color: var(--amber); }
.bkw  { color: var(--cyan);  font-weight: bold; }
.bstr { color: #88ee88; }
.bref { color: var(--amber); }
/* Hex dump colours */
.hex-off { color: var(--amber); }
.hex-hex { color: var(--green-hi); }
.hex-asc { color: var(--cyan); }
.hex-bar { color: var(--border); }
.hex-np  { color: var(--grey); opacity: 0.7; }

/* ── Editable disk title ── */
.panel-title-editable {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 2px;
  transition: background 0.15s, color 0.15s;
}
.panel-title-editable:hover {
  background: rgba(0, 255, 80, 0.08);
  color: var(--cyan);
}
.panel-title-input {
  background: #010e01;
  color: var(--green-hi);
  border: 1px solid var(--cyan);
  border-radius: 3px;
  outline: none;
  font-family: var(--font);
  font-size: inherit;
  letter-spacing: inherit;
  padding: 0 4px;
  height: 1.4em;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ── BASIC syntax-highlighted view ── */
.basic-view-area {
  flex: 1;
  margin: 0;
  padding: 10px 18px;
  background: #030b03;
  color: var(--green-hi);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
  white-space: pre;
}
.basic-view-area .bln  { color: var(--cyan);    }   /* line numbers    */
.basic-view-area .bkw  { color: var(--amber);   font-weight: bold; } /* keywords */
.basic-view-area .bstr { color: #7ec880;        }   /* strings + REM   */
.basic-view-area .bref { color: var(--cyan);    }   /* line-number refs*/

/* ── Editor panes ── */
.editor-pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.editor-pane-note {
  padding: 4px 14px;
  font-size: 10px;
  color: var(--amber);
  background: #0a0f0a;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.editor-textarea {
  flex: 1;
  width: 100%;
  background: #030b03;
  color: var(--green-hi);
  border: none;
  outline: none;
  resize: none;
  padding: 12px 18px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.55;
  tab-size: 8;
  box-sizing: border-box;
}
/* HEX editor */
.hex-edit-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #0a0f0a;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hex-byte-count {
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.5px;
  margin-left: 6px;
}
.hex-editor-wrap {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.hex-edit-area {
  flex: 1;
  background: #030b03;
  color: var(--green-hi);
  border: none;
  outline: none;
  resize: none;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.55;
  box-sizing: border-box;
  border-right: 1px solid var(--border);
}
.hex-ascii-pane {
  width: 152px;
  flex-shrink: 0;
  background: #020902;
  color: var(--cyan);
  border: none;
  outline: none;
  resize: none;
  padding: 10px 10px;
  margin: 0;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.55;
  box-sizing: border-box;
  white-space: pre;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
}
.hex-ascii-pane::-webkit-scrollbar { display: none; }
.hex-ascii-pane:focus { outline: none; box-shadow: inset 1px 0 0 var(--cyan); }

/* ── New disk format picker ── */
.new-disk-section-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.new-disk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}
.new-disk-opt {
  background: #0a1a0a;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.12s, background 0.12s;
}
.new-disk-opt:hover {
  border-color: var(--cyan);
  background: #0a1f1a;
}
.nd-name {
  font-size: 12px;
  font-weight: bold;
  color: var(--green-hi);
  letter-spacing: 0.5px;
}
.nd-size {
  font-size: 13px;
  color: var(--amber);
  font-family: var(--font-mono);
}
.nd-desc {
  font-size: 10px;
  color: var(--green-dim);
  line-height: 1.4;
}

.modal-header {
  background: var(--green);
  color: #000;
  padding: 6px 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 16px 14px;
  color: var(--white);
  line-height: 1.7;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

/* Form fields inside modal */
.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.field-row label {
  width: 100px;
  color: var(--green-dim);
  font-size: 12px;
  text-align: right;
  text-transform: uppercase;
  flex-shrink: 0;
}

.field-row input[type=text],
.field-row input[type=number] {
  background: #060e06;
  border: 1px solid var(--border);
  color: var(--green-hi);
  font-family: var(--font);
  font-size: 13px;
  padding: 4px 8px;
  flex: 1;
  outline: none;
  letter-spacing: 1px;
}

.field-row input:focus { border-color: var(--green-hi); }
.field-row .hint { font-size: 11px; color: var(--grey); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-left: 108px;
}

.checkbox-row input[type=checkbox] {
  accent-color: var(--green);
  width: 14px;
  height: 14px;
}

.checkbox-row label { color: var(--green-dim); font-size: 12px; cursor: pointer; }

.warn-box {
  background: #1e0000;
  border: 1px solid #6a1515;
  color: var(--red);
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.info-box {
  background: #001e08;
  border: 1px solid var(--border);
  color: var(--green-dim);
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.zip-note {
  background: #001520;
  border: 1px solid #105080;
  color: var(--cyan);
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ── Toasts ──────────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 36px;
  right: 10px;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  pointer-events: none;
}

.toast {
  padding: 8px 14px;
  font-size: 12px;
  border: 1px solid;
  letter-spacing: 0.5px;
  pointer-events: none;
  animation: toastIn 0.2s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 340px;
}

.toast-ok  { background: #001e08; border-color: var(--green-dim); color: var(--green-hi); }
.toast-err { background: #1e0000; border-color: #6a1515;          color: var(--red); }
.toast-info{ background: #001220; border-color: #105080;           color: var(--cyan); }

@keyframes toastIn  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Spinners ────────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

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

/* ── Drag highlight ──────────────────────────────────────────────── */

.disk-panel.drag-target { outline: 2px dashed var(--green-hi); }

/* ── Scrollbars ──────────────────────────────────────────────────── */

* { scrollbar-width: thin; scrollbar-color: var(--border) #060a06; }

/* ── Responsive tweaks ───────────────────────────────────────────── */

@media (max-width: 900px) {
  #workspace { flex-direction: column; }
  .disk-panel { margin: 4px 6px; }
  .col-load, .col-exec, .col-sector { display: none; }
}

/* ── Cursor blink ────────────────────────────────────────────────── */

.blink { animation: blink 1s step-end infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Hex view ────────────────────────────────────────────────────── */

.hex-view {
  font-family: var(--font);
  font-size: 12px;
  color: var(--green-dim);
  white-space: pre;
  overflow: auto;
  max-height: 260px;
  background: #060a06;
  border: 1px solid var(--border);
  padding: 8px;
  line-height: 1.5;
}

.hex-addr  { color: var(--grey); margin-right: 12px; }
.hex-bytes { color: var(--green); margin-right: 12px; }
.hex-ascii { color: var(--white); }

/* ── Disk title edit ─────────────────────────────────────────────── */

.disk-title-edit {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--amber-dim);
  color: var(--amber);
  font-family: var(--font);
  font-size: 12px;
  width: 120px;
  outline: none;
  padding: 0 2px;
}

/* Progress bar in modal */
.progress-bar { height: 6px; background: var(--border); margin: 10px 0; }
.progress-bar-fill { height: 100%; background: var(--green); transition: width 0.3s; }

/* ── RISC OS filetype badges ─────────────────────────────────────── */

.ft-badge {
  display: inline-block;
  background: #003030;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font);
  font-size: 10px;
  padding: 0 4px;
  border-radius: 2px;
  vertical-align: middle;
  white-space: nowrap;
  cursor: default;
}

.ft-hex {
  color: var(--green-dim);
  font-family: var(--font);
  font-size: 10px;
  vertical-align: middle;
}

/* Filetype dropdown in edit-file modal */
.ft-select {
  font-family: var(--font);
  font-size: 11px;
  background: var(--bg-panel);
  color: var(--green);
  border: 1px solid var(--border-hi);
  padding: 2px 4px;
  width: 240px;
  cursor: pointer;
}

.ft-select:focus {
  outline: none;
  border-color: var(--cyan);
}
