/**
 * BENED Storage Box™ — Universal file picker & upload widget
 * Part of the BENED Storage ecosystem.
 *
 * Self-contained styles — all selectors scoped to .bsb-* prefix.
 * No framework dependencies. No Tailwind. Pure CSS.
 */

/* ── Overlay ──────────────────────────────────────────────── */
.bsb-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.bsb-overlay.bsb-active {
  opacity: 1;
  visibility: visible;
}

/* ── Dialog ───────────────────────────────────────────────── */
.bsb-dialog {
  width: 90vw;
  max-width: 740px;
  max-height: 85vh;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(10px);
  transition: transform 0.2s;
  overflow: hidden;
}
.bsb-overlay.bsb-active .bsb-dialog {
  transform: translateY(0);
}

/* ── Header ───────────────────────────────────────────────── */
.bsb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1f2937;
  flex-shrink: 0;
}
.bsb-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
}
.bsb-header-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.bsb-header-close:hover {
  color: #f9fafb;
  background: #1f2937;
}

/* ── Tabs ─────────────────────────────────────────────────── */
.bsb-tabs {
  display: flex;
  border-bottom: 1px solid #1f2937;
  padding: 0 20px;
  flex-shrink: 0;
}
.bsb-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.bsb-tab:hover {
  color: #d1d5db;
}
.bsb-tab.bsb-tab-active {
  color: #d97706;
  border-bottom-color: #d97706;
}

/* ── Body (scrollable) ────────────────────────────────────── */
.bsb-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 300px;
}

/* ── Panel visibility ─────────────────────────────────────── */
.bsb-panel { display: none; }
.bsb-panel.bsb-panel-active { display: block; }

/* ── Upload drop zone ─────────────────────────────────────── */
.bsb-dropzone {
  border: 2px dashed #374151;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.bsb-dropzone:hover,
.bsb-dropzone.bsb-drag-over {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.05);
}
.bsb-dropzone-icon {
  width: 48px;
  height: 48px;
  color: #4b5563;
  margin: 0 auto 12px;
}
.bsb-dropzone-text {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 12px;
}
.bsb-dropzone-btn {
  display: inline-block;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.bsb-dropzone-btn:hover {
  background: #1d4ed8;
}
.bsb-dropzone-hint {
  font-size: 11px;
  color: #4b5563;
  margin-top: 10px;
}

/* ── Upload progress item ─────────────────────────────────── */
.bsb-upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #1f2937;
}
.bsb-upload-item:last-child { border-bottom: none; }
.bsb-upload-icon { font-size: 24px; flex-shrink: 0; }
.bsb-upload-info { flex: 1; min-width: 0; }
.bsb-upload-name {
  font-size: 13px;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bsb-upload-meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}
.bsb-upload-cost {
  font-size: 10px;
  color: #fbbf24;
  margin-top: 4px;
  line-height: 1.3;
  font-style: italic;
}
.bsb-upload-bar-wrap {
  height: 4px;
  background: #1f2937;
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.bsb-upload-bar {
  height: 100%;
  background: #2563eb;
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}
.bsb-upload-bar.bsb-done { background: #059669; }
.bsb-upload-bar.bsb-error { background: #dc2626; }
.bsb-upload-status {
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}
.bsb-upload-status.bsb-s-pending { color: #6b7280; }
.bsb-upload-status.bsb-s-uploading { color: #60a5fa; }
.bsb-upload-status.bsb-s-queued { color: #a78bfa; }
.bsb-upload-status.bsb-s-processing { color: #fbbf24; }
.bsb-upload-status.bsb-s-ready { color: #34d399; }
.bsb-upload-status.bsb-s-failed { color: #f87171; }

/* ── Browse: file grid ────────────────────────────────────── */
.bsb-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.bsb-search-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s;
}
.bsb-search-input:focus {
  border-color: #d97706;
}
.bsb-search-input::placeholder {
  color: #6b7280;
}
.bsb-filter-select {
  padding: 8px 12px;
  font-size: 13px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #e5e7eb;
  outline: none;
  cursor: pointer;
}

.bsb-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.bsb-file-card {
  background: #1f2937;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.bsb-file-card:hover {
  border-color: #374151;
  background: #1a2332;
}
.bsb-file-card.bsb-selected {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.08);
}
.bsb-file-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  background: #111827;
  display: block;
}
.bsb-file-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #4b5563;
}
.bsb-file-name {
  font-size: 12px;
  color: #d1d5db;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bsb-file-size {
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
}

.bsb-empty {
  text-align: center;
  padding: 48px 16px;
  color: #6b7280;
  font-size: 14px;
}
.bsb-loading {
  text-align: center;
  padding: 48px 16px;
  color: #9ca3af;
  font-size: 14px;
}

/* ── Footer ───────────────────────────────────────────────── */
.bsb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #1f2937;
  flex-shrink: 0;
}
.bsb-footer-info {
  font-size: 12px;
  color: #6b7280;
}
.bsb-footer-actions {
  display: flex;
  gap: 8px;
}
.bsb-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.bsb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.bsb-btn-cancel {
  background: #374151;
  color: #d1d5db;
}
.bsb-btn-cancel:hover:not(:disabled) {
  background: #4b5563;
}
.bsb-btn-select {
  background: #d97706;
  color: #fff;
}
.bsb-btn-select:hover:not(:disabled) {
  background: #b45309;
}

/* ── Bucket setup guidance ────────────────────────────────── */
.bsb-bucket-setup {
  text-align: center;
  padding: 24px;
}
.bsb-bucket-icon {
  width: 56px;
  height: 56px;
  color: #d97706;
  margin: 0 auto 16px;
}
.bsb-bucket-title {
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 8px;
}
.bsb-bucket-desc {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 20px;
  line-height: 1.5;
}
.bsb-bucket-steps {
  text-align: left;
  max-width: 480px;
  margin: 0 auto 24px;
}
.bsb-bucket-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.bsb-bucket-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d97706;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bsb-bucket-step-text {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.4;
}
.bsb-bucket-step-text strong { color: #f9fafb; }
.bsb-bucket-step-text a {
  color: #d97706;
  text-decoration: underline;
}
.bsb-bucket-step-text a:hover { color: #fbbf24; }
.bsb-bucket-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #d97706;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
.bsb-bucket-link:hover { background: #b45309; }
.bsb-bucket-refresh {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
}
.bsb-bucket-refresh a {
  color: #d97706;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Scrollbar ────────────────────────────────────────────── */
.bsb-body::-webkit-scrollbar {
  width: 6px;
}
.bsb-body::-webkit-scrollbar-track {
  background: transparent;
}
.bsb-body::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 3px;
}
.bsb-body::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* ── Load more ────────────────────────────────────────────── */
.bsb-load-more {
  text-align: center;
  margin-top: 16px;
}
.bsb-load-more-btn {
  padding: 8px 20px;
  font-size: 13px;
  color: #9ca3af;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.bsb-load-more-btn:hover {
  background: #374151;
}

/* ── Onboarding Section ───────────────────────────────────── */
.bsb-onboard-section {
  margin-top: 20px;
  border-top: 1px solid #1f2937;
  padding-top: 20px;
}
.bsb-onboard-header {
  font-size: 13px;
  font-weight: 600;
  color: #d97706;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Step indicator */
.bsb-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 4px;
}
.bsb-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f2937;
  border: 2px solid #374151;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.bsb-step-dot.bsb-step-active {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}
.bsb-step-dot.bsb-step-done {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
.bsb-step-line {
  flex: 1;
  height: 2px;
  background: #374151;
  max-width: 80px;
  transition: background 0.2s;
}
.bsb-step-line.bsb-step-line-done {
  background: #059669;
}
.bsb-step-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  margin-bottom: 16px;
}
.bsb-step-label {
  font-size: 11px;
  color: #6b7280;
  flex: 1;
  text-align: center;
}
.bsb-step-label.bsb-step-label-active {
  color: #d97706;
  font-weight: 600;
}

/* Form fields */
.bsb-onboard-form {
  margin-bottom: 16px;
}
.bsb-field {
  margin-bottom: 14px;
}
.bsb-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 6px;
}
.bsb-optional {
  font-weight: 400;
  color: #6b7280;
}
.bsb-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  font-family: inherit;
}
.bsb-input:focus {
  border-color: #d97706;
}
.bsb-input::placeholder {
  color: #6b7280;
}
.bsb-textarea {
  resize: vertical;
  min-height: 60px;
}
.bsb-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.bsb-hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

/* Radio groups */
.bsb-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bsb-radio-group.bsb-radio-row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.bsb-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #1f2937;
  transition: border-color 0.15s, background 0.15s;
}
.bsb-radio:hover {
  border-color: #4b5563;
  background: #1a2332;
}
.bsb-radio input[type="radio"] {
  display: none;
}
.bsb-radio input[type="radio"]:checked + .bsb-radio-mark {
  border-color: #d97706;
  background: #d97706;
}
.bsb-radio input[type="radio"]:checked + .bsb-radio-mark::after {
  opacity: 1;
}
.bsb-radio-mark {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #4b5563;
  background: transparent;
  position: relative;
  margin-top: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.bsb-radio-mark::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.bsb-radio-text {
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.3;
}
.bsb-radio-text small {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 1px;
}
.bsb-radio-group.bsb-radio-row .bsb-radio {
  flex: 1;
  min-width: 120px;
}

/* Checkbox (attestation) */
.bsb-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  border: 1px solid #374151;
  border-radius: 8px;
  background: #1f2937;
  transition: border-color 0.15s;
}
.bsb-checkbox:hover {
  border-color: #4b5563;
}
.bsb-checkbox input[type="checkbox"] {
  display: none;
}
.bsb-checkbox input[type="checkbox"]:checked + .bsb-check-mark {
  border-color: #d97706;
  background: #d97706;
}
.bsb-checkbox input[type="checkbox"]:checked + .bsb-check-mark::after {
  opacity: 1;
}
.bsb-check-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #4b5563;
  position: relative;
  margin-top: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.bsb-check-mark::after {
  content: '\2713';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.bsb-check-text {
  font-size: 12px;
  color: #d1d5db;
  line-height: 1.5;
}
.bsb-attest {
  margin-top: 16px;
}

/* Review card */
.bsb-review-card {
  background: #0d1117;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.bsb-review-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.bsb-review-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #1f2937;
  font-size: 13px;
}
.bsb-review-row:last-child {
  border-bottom: none;
}
.bsb-review-row span:first-child {
  color: #6b7280;
}
.bsb-review-row span:last-child {
  color: #e5e7eb;
  font-weight: 500;
}

/* Navigation buttons */
.bsb-onboard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}
.bsb-btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

/* Onboarding success */
.bsb-onboard-success {
  text-align: center;
  padding: 24px 16px;
  margin-top: 20px;
  border-top: 1px solid #1f2937;
}
.bsb-onboard-success-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.bsb-onboard-success-text {
  font-size: 16px;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 4px;
}
.bsb-onboard-success-sub {
  font-size: 13px;
  color: #9ca3af;
}
.bsb-onboard-success-sub strong {
  color: #d97706;
}

/* Shake animation for attestation reminder */
@keyframes bsb-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.bsb-shake {
  animation: bsb-shake 0.5s ease-in-out;
}
.bsb-shake .bsb-checkbox {
  border-color: #dc2626;
}

/* ── Required indicator ───────────────────────────────────── */
.bsb-required {
  color: #dc2626;
  font-weight: 700;
}

/* ── Onboarding upload progress (compact bar) ─────────────── */
.bsb-onboard-upload-status {
  background: #0d1117;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.bsb-onboard-prog-wrap {
  height: 3px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.bsb-onboard-prog-bar {
  height: 100%;
  background: #2563eb;
  border-radius: 3px;
  transition: width 0.3s;
}
.bsb-onboard-prog-bar.bsb-prog-done {
  background: #059669;
}
.bsb-onboard-prog-bar.bsb-prog-error {
  background: #dc2626;
}
.bsb-onboard-prog-bar.bsb-prog-pulse {
  background: #d97706;
  animation: bsb-pulse 1.5s ease-in-out infinite;
}
@keyframes bsb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.bsb-onboard-prog-text {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Onboarding success thumbnail ─── */
.bsb-onboard-success-thumb {
  display: block;
  max-width: 220px;
  max-height: 140px;
  border-radius: 8px;
  margin: 0 auto 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ── Thumbnail upload in onboarding ─── */
.bsb-thumb-upload {
  margin-top: 4px;
}
.bsb-thumb-dropzone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px dashed #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: #9ca3af;
  font-size: 13px;
}
.bsb-thumb-dropzone:hover {
  border-color: #d97706;
  background: rgba(217,119,6,.05);
  color: #d1d5db;
}
.bsb-thumb-icon {
  flex-shrink: 0;
  color: #6b7280;
}
.bsb-thumb-dropzone:hover .bsb-thumb-icon {
  color: #d97706;
}
.bsb-thumb-preview-wrap {
  position: relative;
  display: inline-block;
}
.bsb-thumb-preview {
  display: block;
  max-width: 200px;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #374151;
}
.bsb-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  border: none;
  cursor: pointer;
  padding: 0;
}
.bsb-thumb-remove:hover {
  background: #ef4444;
}

/* ── Mobile Responsive ────────────────────────────────────── */
@media (max-width: 640px) {
  .bsb-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
    /* iOS safe area: don't hide behind notch/dynamic island or home indicator */
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bsb-overlay {
    align-items: stretch;
  }
  .bsb-body {
    flex: 1;
    min-height: 0;
  }
  .bsb-header {
    padding: 12px 16px;
  }
  .bsb-header-close {
    /* Ensure close button is clearly visible on mobile */
    font-size: 26px;
    padding: 8px 12px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .bsb-header-title {
    font-size: 15px;
  }
  .bsb-tabs {
    padding: 0 12px;
  }
  .bsb-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  .bsb-footer {
    padding: 10px 12px;
    flex-direction: column;
    gap: 8px;
  }
  .bsb-footer-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .bsb-footer-actions .bsb-btn {
    flex: 1;
  }
  .bsb-dropzone {
    padding: 24px 16px;
    min-height: 180px;
  }
  .bsb-dropzone-icon {
    width: 36px;
    height: 36px;
  }
  .bsb-dropzone-text {
    font-size: 14px;
  }
  .bsb-dropzone-btn {
    padding: 12px 24px;
    font-size: 15px;
    min-height: 44px; /* touch target */
  }
  /* Onboarding form */
  .bsb-onboard-form {
    padding: 12px;
  }
  .bsb-onboard-group label {
    font-size: 13px;
  }
  .bsb-onboard-group input,
  .bsb-onboard-group textarea,
  .bsb-onboard-group select {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 10px;
  }
  .bsb-onboard-nav {
    padding: 12px;
  }
  .bsb-onboard-nav .bsb-btn {
    min-height: 44px;
    font-size: 14px;
  }
  /* Bucket setup */
  .bsb-bucket-setup {
    padding: 20px 16px;
  }
  .bsb-bucket-title {
    font-size: 18px;
  }
  .bsb-bucket-desc {
    font-size: 13px;
  }
  /* File grid (browse) */
  .bsb-file-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 8px;
  }
  /* Upload queue items */
  .bsb-upload-item {
    padding: 8px 12px;
  }
  .bsb-upload-name {
    font-size: 13px;
    max-width: 180px;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .bsb-header-title {
    font-size: 14px;
  }
  .bsb-tab {
    padding: 8px 8px;
    font-size: 12px;
  }
  .bsb-dropzone {
    padding: 20px 12px;
  }
}
