/* ---------- Global Reset / Basic Page Styling ---------- */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  background: #f4f4f9;
  color: #333;
  font-family: Arial, sans-serif;
}

/* Main container or content area that can grow/shrink */
.main-content {
  flex: 1;
  /*    width: 100%; */
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

/* ---------- App Header / Navigation ---------- */
.app-header,
.app-nav {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.app-header {
  padding: 1rem 1rem 0;
  box-sizing: border-box;
}

.app-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.2rem 1.3rem 1.05rem;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(140deg, #0b6a27 0%, #0f8c2f 58%, #1ea34a 100%);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  color: #fff;
}

.app-header-copy {
  min-width: 0;
}

.app-header-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240, 253, 244, 0.9);
}

.app-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.app-nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.7rem 0.95rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.app-nav {
  margin-bottom: 1rem;
  padding: 0 1rem;
}

.app-nav-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.browser-page .app-header,
.browser-page .app-nav,
.browser-page .main-content {
  max-width: 980px;
}

.app-nav-link {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  padding: 0.9rem 1rem;
  color: #1f2937;
  text-decoration: none;
  font-weight: 700;
  border-right: 1px solid #e5e7eb;
  transition: background 0.18s ease, color 0.18s ease;
}

.app-nav-link:hover,
.app-nav-link:focus {
  background: #e8f5ea;
  color: #0f6d2f;
}

.app-nav-link.is-active {
  background: #0f6d2f;
  color: #fff;
}

.app-nav-link.app-nav-link-booster {
  margin-left: auto;
  border-left: 1px solid #e5e7eb;
  border-right: 0;
  color: #b45309;
}

.app-nav-link.app-nav-link-booster:hover,
.app-nav-link.app-nav-link-booster:focus {
  background: #b45309;
  color: #fff;
}

.app-nav-link.is-disabled {
  color: #9ca3af;
  pointer-events: none;
  background: #fff;
}

@media (max-width: 900px) {
  .app-header {
    padding: 0.9rem 0.9rem 0;
  }

  .app-header-inner {
    padding: 1.05rem 1.1rem 0.95rem;
  }

  .app-header h1 {
    font-size: clamp(1.75rem, 4.8vw, 2.25rem);
  }

  .app-nav {
    margin-bottom: 0.85rem;
    padding: 0 0.9rem;
  }

  .app-nav-inner {
    flex-wrap: nowrap;
  }

  .app-nav-link {
    min-height: 3rem;
    padding: 0.8rem 0.85rem;
    font-size: 0.95rem;
  }

  .main-content {
    padding: 0.85rem;
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 0.7rem 0.7rem 0;
  }

  .app-header-inner {
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: 20px;
  }

  .app-header-kicker {
    margin-bottom: 0.25rem;
    font-size: 0.68rem;
  }

  .app-header h1 {
    font-size: clamp(1.25rem, 7.2vw, 1.75rem);
    line-height: 1.06;
  }

  .app-nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .app-nav {
    display: none;
    margin-bottom: 0.8rem;
    padding: 0 0.7rem;
  }

  .app-nav.is-open {
    display: block;
  }

  .app-nav-inner {
    display: block;
    border-top: 0;
    border-radius: 18px;
  }

  .app-nav-link {
    display: block;
    min-height: auto;
    padding: 0.9rem 1rem;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .app-nav-link.app-nav-link-booster {
    margin-left: 0;
    border-left: 0;
  }

  .app-nav-inner .app-nav-link:last-child {
    border-bottom: 0;
  }
}

/* ---------- Main Content Container ---------- */
/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 14px;
  color: #777;
  padding: 1em;
  margin-top: auto;
  /* push footer down if content is short */
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.text-error {
  color: red
    /* Example error red */
}


.text-warning {
  color: #ff9800;
  /* Example warning orange */
}

/* General Banner Styling */
.banner {
  padding: 1rem;
  border-radius: 4px;
  position: relative;
  margin-bottom: 1rem;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Space between icon and text */
}

.banner-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

.banner-close:hover {
  opacity: 0.8;
  /* Subtle hover effect */
}

/* Specific Banner Types */
.banner-error {
  background-color: #fdecea;
  /* Light red */
  color: #b91c1c;
  /* Dark red */
  border-color: #fca5a5;
  /* Medium red */
}

.banner-warning {
  background-color: #fef3c7;
  /* Light yellow */
  color: #854d0e;
  /* Dark gold */
  border-color: #fcd34d;
  /* Medium gold */
}

.banner-info {
  background-color: #dbeafe;
  /* Light blue */
  color: #1e40af;
  /* Dark blue */
  border-color: #93c5fd;
  /* Medium blue */
}

.banner-success {
  background-color: #dcfce7;
  /* Light green */
  color: #065f46;
  /* Dark green */
  border-color: #6ee7b7;
  /* Medium green */
}

/* Font Awesome Icon Styling */
.banner-icon {
  font-size: 1.5rem;
  /* Larger icon size */
  margin-right: 0.5rem;
}

[x-cloak] {
  display: none !important;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  z-index: 1001;
}

/* Folder list container: white background and smooth touch scrolling */
.folder-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
  -webkit-overflow-scrolling: touch;
}

/* Each folder row with transparent gap above and below */
.folder-list li {
  margin: 2px 0;
}

.folder-list li:last-child {
  margin-bottom: 0;
}

.folder-list li button {
  display: block;
  width: 100%;
  background-color: #eee;
  border: none;
  text-align: left;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
}

.folder-loading-item {
  padding: 0.75rem 0.8rem;
  color: #555;
  font-family: "Courier New", Courier, monospace;
}

.modal[x-show="showDeleteModal"] {
  display: flex;
}

.modal[x-show="showLaunchModal"] {
  display: flex;
}

.modal[x-show="showInfoModal"] {
  display: flex;
}

.modal[x-show="showErrorModal"] {
  display: flex;
}

.modal[x-show="showConfirmationModal"] {
  display: flex;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  max-width: 90%;
  width: 400px;
}

.modal-buttons {
  margin-top: 1.5rem;
  text-align: right;
}

.modal-buttons .pure-button+.pure-button {
  margin-left: 0.5rem;
}

.booster-confirm-modal h3 {
  margin-top: 0;
  color: #8a3d00;
}

.booster-confirm-modal p {
  margin-bottom: 0.75rem;
}

.booster-launch-modal {
  width: 420px;
}

.booster-launch-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.booster-launch-icon {
  margin-top: 0.1rem;
}

.remote-download-modal {
  width: min(92vw, 460px);
}

.remote-download-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.remote-download-icon {
  margin-top: 0.1rem;
}

.remote-download-source code {
  word-break: break-all;
}

.remote-download-status {
  margin: 0.65rem 0 0;
  color: #4b5563;
}

/* Modal Information Icon */
.modal-info-icon {
  color: #008000;
  /* Green tone matching the existing icons */
  font-size: 2rem;
  /* Larger size for emphasis */
  margin-right: 1rem;
  /* Space between icon and text */
}

/* Spinner Styles */
.spinner {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
  display: block;
}

.pure-button-warning {
  background-color: #e57373;
  /* Light red */
  color: white;
}

.pure-button-warning:hover {
  background-color: #c62828;
  /* Dark red */
}

/* ---------- Browser Home ---------- */
.browser-main {
  max-width: 980px;
}

.browser-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 34%),
    linear-gradient(135deg, #f0fdf4 0%, #ecfccb 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
}

.browser-kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.browser-hero-copy h2 {
  margin: 0;
  color: #14532d;
  font-size: 2rem;
  line-height: 1.08;
}

.browser-hero-copy p {
  margin: 0.8rem 0 0;
  color: #365314;
  font-size: 1rem;
  line-height: 1.55;
}

.browser-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-self: stretch;
}

.browser-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(34, 197, 94, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.browser-stat-card span {
  color: #4d7c0f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.browser-stat-card strong {
  color: #14532d;
  font-size: 1.6rem;
  line-height: 1;
}

.browser-loading {
  margin: 1rem 0;
}

.browser-loading-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
}

.browser-loading-card i {
  color: #166534;
  font-size: 1.35rem;
}

.browser-loading-card strong {
  display: block;
  color: #1f2937;
}

.browser-loading-card p {
  margin: 0.2rem 0 0;
  color: #64748b;
}

.browser-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.browser-filter-panel,
.browser-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.browser-search-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.browser-search-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 auto;
  padding: 0.82rem 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
}

.browser-search-field i {
  color: #64748b;
}

.browser-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font-size: 1rem;
}

.browser-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.taxonomy-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid #d8dee7;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

.taxonomy-chip strong {
  min-width: 1.35rem;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  font-size: 0.78rem;
  text-align: center;
}

.taxonomy-chip.active {
  border-color: #16a34a;
  background: #166534;
  color: #fff;
}

.taxonomy-chip.active strong {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.browser-summary {
  margin: 0.9rem 0 0;
  color: #475569;
}

.browser-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.2rem;
}

.browser-section-head h3 {
  margin: 0.15rem 0 0;
  color: #0f172a;
  font-size: 1.35rem;
}

.browser-section-kicker {
  display: inline-block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.browser-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
}

.browser-section-copy {
  margin: 0 0 0.95rem;
  color: #64748b;
}

.browser-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.browser-entry-card,
.browser-entry-row {
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #f8fafc;
}

.browser-entry-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem;
  align-items: stretch;
  overflow: hidden;
}

.browser-entry-featured-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
}

.browser-entry-featured h4,
.browser-entry-row-title h4 {
  margin: 0;
  color: #0f172a;
}

.browser-entry-topline,
.browser-entry-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.browser-entry-date {
  color: #166534;
  font-size: 0.84rem;
  font-weight: 700;
}

.browser-entry-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}

.browser-entry-path {
  margin: 0;
  color: #64748b;
  font-family: monospace;
  font-size: 0.88rem;
  word-break: break-all;
}

.browser-entry-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex: 0 0 auto;
}

.browser-entry-actions-rail {
  min-width: 3.7rem;
  padding: 0.9rem 0.9rem 0.9rem 0.15rem;
}

.browser-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: #0f6d2f;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(15, 109, 47, 0.18);
  color: #fff;
  position: relative;
  z-index: 1;
  line-height: 1;
  flex: 0 0 auto;
  pointer-events: auto;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.browser-download-button:hover,
.browser-download-button:focus {
  background: #0b5a26;
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(11, 90, 38, 0.24);
}

.browser-download-button .fas {
  font-size: 1.15rem;
}

.browser-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.browser-entry-row {
  display: flex;
  justify-content: space-between;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.browser-entry-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
}

.browser-empty-state {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}

.browser-empty-state i {
  color: #64748b;
  font-size: 1.2rem;
}

.browser-empty-state p {
  margin: 0;
}

.browser-empty-state-muted {
  background: #f8fafc;
}

.browser-inline-note {
  margin: 0.85rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .browser-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .browser-search-row,
  .browser-entry-row {
    flex-direction: column;
    align-items: stretch;
  }

  .browser-entry-featured {
    grid-template-columns: 1fr;
  }

  .browser-entry-actions-rail {
    min-width: 0;
    padding-top: 0;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .browser-download-button {
    min-height: 0;
  }

  .browser-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* File Manager Table Styles */
/* Monospace font for file manager table */
table.pure-table td,
table.pure-table th {
  font-family: monospace;
}

/* Highlight sorted column */
th.sorted {
  background: #e0e0e0;
  cursor: pointer;
}

/* Hidden files appear greyed out */
.hidden-row * {
  color: #888 !important;
}

/* Read-only files appear in red */
.readonly-row * {
  color: red !important;
}

/* Clickable rows underline on hover */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  text-decoration: underline;
}

.folder-loading-cell {
  color: #555;
  font-family: "Courier New", Courier, monospace;
  padding: 1rem 0.75rem;
  text-align: center;
}

.folder-loading-cell i {
  margin-right: 0.5rem;
}

/* ---------- Upload Progress Modal ---------- */
.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  /* ensure above detail-modal */
  z-index: 2000;
}

.upload-modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  min-width: 200px;
}

.upload-modal[ x-cloak] {
  display: none;
}

/* ---------- Detail Modal ---------- */
.detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2rem;
  z-index: 1000;
}

.detail-modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: left;
  min-width: 300px;
}

.detail-modal[ x-cloak] {
  display: none;
}

.disk-modal-content {
  min-width: 320px;
  max-width: 560px;
}

.disk-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.disk-size-option {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid #d5dce6;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f2937;
}

.disk-size-option strong {
  font-size: 0.95rem;
}

.disk-size-option span {
  font-size: 0.82rem;
  color: #4b5563;
}

.disk-size-option.active {
  border-color: #0078e7;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px rgba(0, 120, 231, 0.15);
}

.disk-size-option:hover {
  background: #eef6ff;
}

.disk-field-label {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.disk-format-group {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.disk-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.8rem;
}

.disk-format-inline {
  margin: 0;
  min-width: 0;
}

.disk-inline-label {
  margin-top: 0;
}

.disk-format-inline-options {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.disk-format-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  margin-top: 0.55rem;
  border: 1px solid #d5dce6;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
}

.disk-format-option input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.disk-format-option span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.disk-format-option strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.disk-format-option small {
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.35;
}

.disk-format-option.active {
  border-color: #0078e7;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px rgba(0, 120, 231, 0.15);
}

.disk-format-pill {
  align-items: center;
  gap: 0.55rem;
  margin-top: 0;
  padding: 0.62rem 0.75rem;
}

.disk-format-pill span {
  gap: 0.05rem;
}

.disk-format-pill strong {
  font-size: 0.88rem;
}

.disk-format-pill small {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.disk-label-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: monospace;
  font-size: 1rem;
  text-transform: uppercase;
}

.disk-file-input-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.disk-file-input {
  flex: 1 1 auto;
}

.disk-field-help {
  margin: 0.6rem 0 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .disk-file-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.disk-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5e7eb;
}

.disk-preview-row code {
  font-size: 0.95rem;
}

.disk-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.copy-destination-modal {
  width: min(92vw, 520px);
}

.convert-modal {
  width: min(92vw, 520px);
}

.rename-modal {
  width: min(92vw, 520px);
}

.delete-modal {
  width: min(92vw, 520px);
}

.rename-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.72rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: monospace;
  font-size: 1rem;
}

.copy-modal-help {
  margin: 0.9rem 0 0;
  color: #4b5563;
  font-size: 0.92rem;
}

.image-import-item-selected {
  background: #eff6ff;
  border-radius: 0.45rem;
}

.image-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.folder-list li .image-import-select {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-radius: 0.8rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.folder-list li .image-import-select:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.image-import-item-selected .image-import-select {
  background: #dbeafe;
  border-color: #93c5fd;
}

.image-import-check {
  flex: 0 0 auto;
  width: 1rem;
  color: #2563eb;
  text-align: center;
}

.image-import-kind {
  flex: 0 0 auto;
  width: 1rem;
  text-align: center;
}

.image-import-kind-folder {
  color: #b45309;
}

.image-import-kind-file {
  color: #475569;
}

.image-import-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-list li .image-import-browse {
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.folder-list li .image-import-browse:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  transform: translateX(1px);
}

.copy-progress-content {
  min-width: min(92vw, 520px);
  max-width: 520px;
  text-align: left;
}

.copy-progress-path {
  margin: 0.5rem 0;
  word-break: break-word;
}

.copy-summary-line {
  margin: 0.75rem 0 0;
  text-align: center;
}

.copy-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.copy-summary-grid div {
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
}

.copy-summary-grid span {
  display: block;
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

.copy-summary-grid strong {
  font-family: monospace;
  font-size: 0.95rem;
}

/* Monospace filename in detail modal */
.detail-filename {
  font-family: monospace;
  margin-bottom: 1rem;
}

/* Danger button style for delete */
.pure-button-danger {
  background: #d9534f;
  color: #fff;
  border: 1px solid #d43f3a;
}

.pure-button-danger:hover {
  background: #c9302c;
}

/* Icons in detail modal labels */
.detail-icon {
  margin-right: 0.5rem;
  width: 1rem;
  text-align: center;
}

/* List delete icon */
.delete-icon {
  color: #d9534f;
  cursor: pointer;
}

.copy-icon {
  color: #2563eb;
  cursor: pointer;
}

.copy-icon:hover {
  color: #1d4ed8;
}

.move-icon {
  color: #b45309;
  cursor: pointer;
}

.move-icon:hover {
  color: #92400e;
}

.browse-image-icon {
  color: #7c3aed;
  cursor: pointer;
}

.browse-image-icon:hover {
  color: #6d28d9;
}

.browse-image-icon-disabled {
  color: #94a3b8;
  cursor: default;
}

.browse-image-icon-disabled:hover {
  color: #94a3b8;
}

.convert-icon {
  color: #0f766e;
  cursor: pointer;
}

.convert-icon:hover {
  color: #115e59;
}

.convert-icon-disabled {
  color: #94a3b8;
  cursor: default;
}

.convert-icon-disabled:hover {
  color: #94a3b8;
}

.delete-icon:hover {
  color: #c9302c;
}

/* Wrapper ensuring inline horizontal alignment of rename/delete icons */
.action-icons {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  /* prevent shrinking in table cell */
}

/* Ensure the icon column never wraps or shrinks below its content width */
.pure-table td:last-child {
  white-space: nowrap;
  width: auto;
  /* allow cell to shrink to icon width */
}

.image-browse-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: center;
  margin: 0.5rem 0 0.85rem;
  padding: 0.55rem 0.8rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 0.45rem;
  color: #991b1b;
}

.image-browse-strip-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.image-browse-strip code {
  background: rgba(255, 255, 255, 0.55);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: #7f1d1d;
}

.image-browse-strip-sep {
  font-weight: 700;
  color: #b91c1c;
}

.image-browse-strip-meta {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 999px;
  color: #7f1d1d;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
}


/* ---------- Custom Tooltip ---------- */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: max-content;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 4px 8px;
  position: absolute;
  z-index: 1001;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* STX->ST preflight verdict badge */
.stx-verdict { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05em; margin: 8px 0; }
.stx-verdict-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.stx-verdict-green { color: #2e7d32; }
.stx-verdict-green .stx-verdict-dot { background: #2e7d32; }
.stx-verdict-yellow { color: #b8860b; }
.stx-verdict-yellow .stx-verdict-dot { background: #f0ad4e; }
.stx-verdict-red { color: #c62828; }
.stx-verdict-red .stx-verdict-dot { background: #c62828; }

/* Consistent spacing for leading action-button icons (EPIC-09) */
.pure-button > i.fas { margin-right: 0.4em; }

/* ---------- Browse mode: mode toggle, A–Z index, pager ---------- */
.mode-toggle {
  display: inline-flex;
  margin-bottom: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  overflow: hidden;
}

.mode-tab {
  border: 0;
  background: transparent;
  color: #334155;
  font: inherit;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.mode-tab.is-active {
  background: #0f6d2f;
  color: #fff;
}

.browse-az {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 1rem;
}

.browse-az-btn {
  min-width: 2.1rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.browse-az-btn:hover:not(.is-disabled) {
  border-color: #16a34a;
  color: #0f6d2f;
}

.browse-az-btn.is-active {
  border-color: #16a34a;
  background: #166534;
  color: #fff;
}

.browse-az-btn.is-disabled {
  color: #cbd5e1;
  background: #f8fafc;
  cursor: default;
  opacity: 0.6;
}

/* "New" (recent) chip stands out from the plain letter buttons */
.browse-az-btn.browse-az-new {
  margin-right: 0.5rem;
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.browse-az-btn.browse-az-new:hover:not(.is-disabled) {
  background: #bbf7d0;
  color: #14532d;
}

.browse-az-btn.browse-az-new.is-active {
  background: #166534;
  color: #fff;
}

.browse-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1rem;
}

.browse-pager-info {
  color: #475569;
  font-size: 0.92rem;
}
