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

:root {
  --green:       #00843D;
  --green-dark:  #006830;
  --green-light: #e8f5ee;
  --blue:        #1a56db;
  --red:         #dc2626;
  --bg:          #f3f4f6;
  --surface:     #ffffff;
  --border:      #e5e7eb;
  --text:        #111827;
  --muted:       #6b7280;
  --sidebar-w:   240px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── Layout ──────────────────────────────────────── */
.layout { display: flex; height: 100vh; }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--green); color: #fff;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { font-size: 15px; font-weight: 700; color: var(--text); }

/* Seletor de conta */
.account-selector {
  padding: 12px 10px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.selector-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted);
  padding: 0 6px 8px;
}
.no-accounts {
  font-size: 12px; color: var(--muted);
  padding: 4px 8px 8px;
}
.selector-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 8px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: background .12s;
}
.selector-item:hover { background: var(--bg); }
.selector-item.active { background: var(--green-light); }

.selector-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--green-light); color: var(--green);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.selector-item.active .selector-avatar { background: var(--green); color: #fff; }

.selector-info { flex: 1; min-width: 0; }
.selector-name  { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selector-email { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.selector-remove {
  background: none; border: none; color: #d1d5db;
  font-size: 16px; cursor: pointer; line-height: 1;
  flex-shrink: 0; padding: 2px 4px;
  transition: color .12s;
}
.selector-remove:hover { color: var(--red); }

.btn-connect {
  width: 100%; margin-top: 8px; padding: 8px;
  background: none; border: 1px dashed var(--border);
  border-radius: 7px; color: var(--muted);
  font-size: 13px; cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.btn-connect:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }

/* Ações na sidebar */
.sidebar-actions {
  padding: 12px 10px;
  flex: 1;
}
.actions-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted);
  padding: 0 6px 8px;
}
.action-group { margin-bottom: 4px; }
.action-group + .action-group { border-top: 1px solid var(--border); padding-top: 4px; margin-top: 4px; }

.action-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: background .12s, color .12s;
}
.action-item:hover { background: var(--bg); color: var(--text); }
.action-item.active { background: var(--green-light); color: var(--green); font-weight: 600; }
.action-item.destructive {
  color: #b91c1c; opacity: .75; font-size: 12px;
  padding: 4px 10px 4px 20px; /* indent para mostrar que é "filho" do item acima */
}
.action-item.destructive:hover { background: #fef2f2; color: var(--red); opacity: 1; }
.action-item.destructive.active { background: #fee2e2; color: var(--red); opacity: 1; }
.action-icon { font-size: 15px; width: 20px; text-align: center; }

/* ── Main ─────────────────────────────────────────── */
.main {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); }
.topbar-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }

.page { padding: 28px; }

/* Empty state */
.empty-page {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.empty-state {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.empty-icon  { font-size: 40px; color: var(--border); }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); }
.empty-sub   { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* ── Dashboard stats ─────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--text); margin-top: 6px; line-height: 1; }
.stat-value.green { color: var(--green); }
.stat-value.blue  { color: var(--blue); }

/* ── Section header ──────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text); }

/* ── Action cards grid ───────────────────────────── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.action-card-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
}
.action-card-group > .action-card:first-child { flex: 1; }
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.action-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); border-color: #d1d5db; }
.action-card.active { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-light); }
.action-card.destructive { border-color: #fecaca; background: #fff8f8; }
.action-card.destructive:hover { border-color: #fca5a5; box-shadow: 0 2px 8px rgba(220,38,38,.08); }
.action-card.destructive.active { border-color: var(--red); box-shadow: 0 0 0 2px #fee2e2; }
.action-card.destructive .action-card-name { color: var(--red); }

/* card de ação oposta (apagar) — mesmo tamanho do card principal */
.action-card-delete {
  border-color: #fecaca;
  background: #fff8f8;
}
.action-card-delete:hover { border-color: #fca5a5; background: #fef2f2; }
.action-card-delete.active { border-color: var(--red); box-shadow: 0 0 0 2px #fee2e2; }
.action-card-delete-icon { font-size: 22px; }
.action-card-delete-label { font-size: 14px; font-weight: 700; color: #b91c1c; }

.action-card-icon { font-size: 22px; }
.action-card-name { font-size: 14px; font-weight: 700; color: var(--text); }
.action-card-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Área de conteúdo da ação ─────────────────────── */
.action-content { margin-top: 4px; }

/* ── Picker de animais (inspeção manual com múltiplos resultados) ── */
.candidates-box {
  margin-top: 16px; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.candidates-title {
  padding: 10px 14px; background: #f9fafb;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.candidate-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.candidate-row:last-child { border-bottom: none; }
.candidate-row:hover { background: var(--green-light); }
.candidate-id { font-weight: 700; color: var(--text); }
.candidate-secondary { color: var(--muted); }
.candidate-meta { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ── TODO box ────────────────────────────────────── */
.todo-box {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 8px; padding: 20px 24px;
  color: #92400e; font-size: 13px; line-height: 2;
}
.todo-box strong { display: block; font-size: 14px; margin-bottom: 4px; }
.todo-box code { background: #fef3c7; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ── Modal ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--surface); border-radius: 12px;
  padding: 28px; width: 400px;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
}
.modal h2 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 20px; }
.modal label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 14px;
}
.modal input {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text);
  font-size: 14px; padding: 9px 12px; outline: none;
  transition: border-color .15s;
}
.modal input:focus { border-color: var(--green); }

.form-actions { display: flex; gap: 10px; margin-top: 4px; }

.btn-primary {
  background: var(--green); color: #fff; border: none;
  border-radius: 7px; padding: 10px 22px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .12s;
}
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-primary:disabled { opacity: .5; cursor: default; }

.btn-ghost {
  background: none; color: var(--muted);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 10px 18px; font-size: 14px; cursor: pointer;
  transition: color .12s, border-color .12s;
}
.btn-ghost:hover { color: var(--text); border-color: #d1d5db; }

.error { color: var(--red); font-size: 13px; margin-top: 8px; }

/* ── Import: passos ──────────────────────────────── */
.import-steps {
  display: flex; gap: 0; margin-bottom: 24px;
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.import-step {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; font-size: 13px; color: var(--muted);
  border-right: 1px solid var(--border);
}
.import-step:last-child { border-right: none; }
.import-step.active { background: var(--green-light); color: var(--green); font-weight: 600; }
.import-step.done   { color: var(--green); }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.import-step.active .step-dot { background: var(--green); color: #fff; }
.import-step.done   .step-dot { background: var(--green); color: #fff; }
.step-label { font-size: 12px; }

/* ── Import: painel ──────────────────────────────── */
.import-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 24px;
}
.panel-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 20px; display: flex; align-items: baseline; gap: 10px;
}
.panel-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.panel-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ── Parâmetros ──────────────────────────────────── */
.params-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.field-label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.field-input {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text);
  font-size: 13px; padding: 8px 10px; outline: none;
  transition: border-color .15s; width: 100%;
}
.field-input:focus { border-color: var(--green); }
.field-input:disabled { opacity: .5; cursor: not-allowed; }

/* ── Upload ──────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 40px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: border-color .15s, background .15s;
}
.upload-area:hover { border-color: var(--green); background: var(--green-light); }
.upload-icon { font-size: 32px; }
.upload-text { font-size: 14px; color: var(--muted); }
.upload-hint { font-size: 12px; color: #d1d5db; }
.upload-status { text-align: center; color: var(--muted); font-size: 13px; margin-top: 12px; }
.error-msg      { color: var(--red);   font-size: 13px; margin-top: 10px; }
.success-msg    { color: var(--green); font-size: 13px; margin-top: 10px; font-weight: 600; }
.loading-options { color: var(--muted); font-size: 13px; margin-top: 10px; }
.info-msg    { color: var(--muted); font-size: 13px; margin-top: 4px; padding: 10px 12px; background: var(--bg); border-radius: 6px; }

/* ── Abas de modo ──────────────────────────────── */
.mode-tabs {
  display: flex; gap: 2px;
  margin: 16px 0 0;
  border-bottom: 2px solid var(--border);
}
.mode-tab {
  padding: 8px 20px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.mode-tab:hover  { color: var(--text); }
.mode-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }

/* ── Mapeamento ──────────────────────────────────── */
.range-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted); margin-bottom: 20px;
}
.range-label { font-weight: 600; color: var(--text); }
.range-input {
  width: 70px; padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 13px; text-align: center; outline: none;
}
.range-input:focus { border-color: var(--green); }

.mapping-header {
  display: flex; gap: 8px; padding: 6px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--muted);
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.mapping-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--green);
  padding: 10px 0 6px;
}
.mapping-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--bg);
}
.mapping-field-label { font-size: 13px; color: var(--text); }
.mapping-modes { display: flex; gap: 10px; }
.mode-opt {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted); cursor: pointer;
}
.mode-opt input { cursor: pointer; accent-color: var(--green); }

/* ── Execução ────────────────────────────────────── */
.progress-wrap { margin-bottom: 16px; }
.progress-bar {
  height: 10px; border-radius: 5px;
  background: var(--border); overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--green);
  border-radius: 5px; transition: width .3s;
}
.progress-counters {
  display: flex; gap: 14px; margin-top: 8px;
  font-size: 13px; font-weight: 600;
}
.counter.ok   { color: var(--green); }
.counter.fail { color: var(--red); }
.counter.total{ color: var(--muted); }

.run-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.btn-run {
  padding: 8px 16px; border-radius: 7px; font-size: 13px;
  font-weight: 600; cursor: pointer; border: none; transition: background .12s, opacity .12s;
}
.btn-run:disabled { opacity: .4; cursor: default; }
.btn-run.start  { background: var(--green); color: #fff; }
.btn-run.start:not(:disabled):hover  { background: var(--green-dark); }
.btn-run.pause  { background: #f59e0b; color: #fff; }
.btn-run.pause:not(:disabled):hover  { background: #d97706; }
.btn-run.retry  { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-run.retry:not(:disabled):hover  { border-color: #d1d5db; }
.btn-run.reset  { background: var(--bg); color: var(--red); border: 1px solid var(--border); }
.btn-run.reset:not(:disabled):hover  { background: #fef2f2; }

.failures-list {
  border: 1px solid #fecaca; border-radius: 8px;
  margin-bottom: 14px; overflow: hidden;
}
.failures-title {
  background: #fef2f2; color: var(--red);
  font-size: 12px; font-weight: 700; padding: 8px 12px;
}
.failure-row {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 12px; font-size: 12px;
  border-top: 1px solid #fecaca;
}
.fail-row-num  { color: var(--red); font-weight: 600; flex-shrink: 0; }
.fail-row-err  { color: var(--text); }

.log-box {
  background: #1a1a2e; border-radius: 8px;
  padding: 14px; height: 200px; overflow-y: auto;
  font-family: 'Consolas', monospace; font-size: 12px;
}
.log-line  { color: #a8b2c8; line-height: 1.6; }
.log-empty { color: #4a5568; font-style: italic; }

/* ── Criar lote (inline) ─────────────────────────── */
.btn-add-lote {
  flex-shrink: 0; width: 30px; height: 30px;
  border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--green);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.btn-add-lote:hover:not(:disabled) { background: var(--green-light); border-color: var(--green); }
.btn-add-lote:disabled { opacity: .4; cursor: default; }

.create-lote-form {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 8px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
}

.btn-sm {
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  border-radius: 6px; cursor: pointer; border: none;
}
.btn-primary.btn-sm { background: var(--green); color: #fff; }
.btn-primary.btn-sm:hover:not(:disabled) { background: var(--green-dark); }
.btn-ghost.btn-sm {
  background: none; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost.btn-sm:hover { color: var(--text); border-color: #9ca3af; }
.btn-sm:disabled { opacity: .4; cursor: default; }

/* ── Cards de lote (dashboard) ───────────────────── */
.lotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.lote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow .15s;
}
.lote-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }

.lote-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.lote-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lote-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; flex-shrink: 0;
}
.lote-badge.open   { background: var(--green-light); color: var(--green); }
.lote-badge.closed { background: var(--bg); color: var(--muted); }

.lote-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; text-align: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lote-stat-value {
  font-size: 22px; font-weight: 700; color: var(--text); line-height: 1;
}
.lote-stat-value.green { color: var(--green); }
.lote-stat-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); margin-top: 4px;
}

.lote-footer { display: flex; flex-direction: column; gap: 5px; }
.lote-meta   { display: flex; justify-content: space-between; align-items: center; }
.lote-meta-key { font-size: 11px; color: var(--muted); }
.lote-meta-val { font-size: 12px; font-weight: 600; color: var(--text); }

/* ════════════════════════════════════════════════
   MOBILE (≤768px)
════════════════════════════════════════════════ */

@media (min-width: 769px) {
  .mobile-dock,
  .mobile-sheet-backdrop,
  .mobile-more-tray { display: none !important; }
}

@media (max-width: 768px) {

  body { overflow-y: auto; height: auto; }

  .layout { flex-direction: column; height: auto; min-height: 100svh; }

  .sidebar { display: none; }

  .main { height: auto; overflow: visible; padding-bottom: 90px; }

  .topbar {
    padding: 12px 16px;
    position: sticky; top: 0; z-index: 10;
    background: var(--surface);
  }
  .topbar-title { font-size: 15px; }
  .topbar-sub   { font-size: 11px; }

  .page { padding: 14px 16px; }

  /* Dashboard fica oculto quando uma ação está aberta */
  .mobile-action-active > .stats-row,
  .mobile-action-active > .section-header,
  .mobile-action-active > .lotes-grid,
  .mobile-action-active > .loading-options,
  .mobile-action-active > .info-msg { display: none; }

  /* Cards de ação substituídos pelo dock */
  .actions-header, .actions-grid { display: none; }

  /* Stats: scroll horizontal */
  .stats-row {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    margin-bottom: 16px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .stats-row::-webkit-scrollbar { display: none; }
  .stat-card { min-width: 130px; flex-shrink: 0; padding: 14px 16px; }
  .stat-value { font-size: 22px; }

  /* Lotes: lista vertical */
  .lotes-grid { grid-template-columns: 1fr; }

  /* Panels */
  .import-panel { padding: 16px; }
  .log-box { height: 130px; }
  .params-grid { grid-template-columns: 1fr; }

  /* Passos: scroll horizontal */
  .import-steps { overflow-x: auto; flex-wrap: nowrap; border-radius: 8px; }
  .import-step  { min-width: 70px; flex-shrink: 0; padding: 10px; gap: 6px; }
  .step-label   { font-size: 10px; }

  /* Botões de execução: scroll horizontal */
  .run-actions { overflow-x: auto; flex-wrap: nowrap; }
  .btn-run     { flex-shrink: 0; }

  /* Modal: full width no mobile */
  .modal { width: calc(100vw - 32px); padding: 22px; }

  /* ── Dock flutuante ─────────────────────────── */
  .mobile-dock {
    display: flex;
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 16, 24, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 8px 10px;
    gap: 2px;
    z-index: 200;
    box-shadow: 0 8px 40px rgba(0,0,0,.45),
                inset 0 1px 0 rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.09);
    max-width: calc(100vw - 20px);
  }

  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background .14s;
    min-width: 46px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .dock-item:active { background: rgba(255,255,255,.16); transform: scale(.93); }
  .dock-item.active { background: rgba(255,255,255,.10); }

  .dock-item-icon  { font-size: 19px; line-height: 1; }
  .dock-item-label {
    font-size: 9px; font-weight: 600; letter-spacing: .2px;
    color: rgba(255,255,255,.42);
    white-space: nowrap;
  }
  .dock-item.active .dock-item-label { color: #4ade80; }

  .dock-account-avatar {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--green); color: #fff;
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
  }
  .dock-account-avatar.empty {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.45);
    font-size: 16px;
    font-weight: 400;
  }

  .dock-divider {
    width: 1px; background: rgba(255,255,255,.09);
    margin: 4px 3px; border-radius: 1px; align-self: stretch;
  }

  /* ── More tray ──────────────────────────────── */
  .mobile-more-tray {
    position: fixed;
    bottom: 86px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 16, 24, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 18px;
    padding: 8px;
    z-index: 199;
    min-width: 195px;
    box-shadow: 0 4px 30px rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.09);
  }

  .more-tray-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-radius: 12px;
    cursor: pointer; font-size: 13px; font-weight: 600;
    color: #fca5a5;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s;
  }
  .more-tray-item:active { background: rgba(255,255,255,.1); }
  .more-tray-item-icon { font-size: 15px; }

  /* ── Bottom sheet de conta ──────────────────── */
  .mobile-sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 300;
    display: flex; align-items: flex-end;
  }

  .mobile-sheet {
    width: 100%;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 24px);
    max-height: 78vh;
    overflow-y: auto;
    box-shadow: 0 -4px 50px rgba(0,0,0,.25);
    animation: sheet-up .22s ease;
  }

  @keyframes sheet-up {
    from { transform: translateY(60px); opacity: .4; }
    to   { transform: translateY(0);    opacity: 1;  }
  }

  .mobile-sheet-handle {
    width: 36px; height: 4px; background: var(--border);
    border-radius: 2px; margin: 14px auto 0;
  }

  .mobile-sheet-title {
    font-size: 16px; font-weight: 700; color: var(--text);
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-sheet-body { padding: 12px 16px 24px; }
  .mobile-sheet .selector-item { margin-bottom: 4px; }

}
