:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #9333ea;
  --danger-soft: #ede9fe;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --sidebar-width: 290px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.mobile-only {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(59, 130, 246, 0.35), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.35), transparent 26%),
    linear-gradient(135deg, #061226 0%, #172554 50%, #2e1065 100%);
}

.login-bg-orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.45;
}

.orb-one {
  background: #38bdf8;
  left: -110px;
  bottom: 8%;
}

.orb-two {
  background: #a855f7;
  right: -80px;
  top: 12%;
}

.login-card {
  width: min(100%, 480px);
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  padding: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 2;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

.login-brand {
  align-items: flex-start;
  margin-bottom: 28px;
}

.login-brand h1,
.sidebar h2,
.topbar h1 {
  margin: 0;
}

.login-brand h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.login-brand span,
.sidebar span,
.eyebrow,
small {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.login-hint {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.55;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #0f172a;
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.sidebar .brand-mark {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.nav-menu {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.nav-item span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: inherit;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #38bdf8;
}

.sidebar-card {
  margin-top: auto;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(124, 58, 237, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-card p {
  margin: 0 0 6px;
  color: #cbd5e1;
  font-size: 13px;
}

.sidebar-card strong {
  display: block;
  margin-bottom: 14px;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

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

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar h1 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.search-box {
  min-width: min(380px, 34vw);
  position: relative;
}

.search-box span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-box input {
  padding-left: 36px;
  background: #fff;
}

.user-menu {
  position: relative;
}

.avatar-btn,
.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.avatar-btn {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #172554;
}

.user-popover {
  position: absolute;
  top: 52px;
  right: 0;
  min-width: 220px;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.user-popover strong,
.user-popover small {
  display: block;
}

.user-popover button {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
}

.view {
  display: none;
  animation: fadeIn .18s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card,
.panel {
  padding: 20px;
}

.metric-card {
  padding: 18px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  position: relative;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto -35px -35px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: var(--primary-soft);
  opacity: 0.75;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
}

.metric-card h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}

.metric-card p,
.card-subtitle {
  margin: 0;
  color: var(--muted);
}

.card-header,
.section-header,
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.card-header h2,
.section-header h2,
.table-header h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.btn {
  border: 0;
  border-radius: 13px;
  padding: 11px 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .24);
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-success {
  background: var(--success-soft);
  color: var(--success);
}

.btn-warning {
  background: var(--warning-soft);
  color: #92400e;
}

.full {
  width: 100%;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.filter-row input,
.filter-row select {
  max-width: 240px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 13px;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

tr:hover td {
  background: #f8fafc;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: #92400e; }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.badge.neutral { background: #f1f5f9; color: #475569; }
.badge.purple { background: #ede9fe; color: var(--purple); }

.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.small-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 7px 10px;
  font-weight: 800;
}

.small-btn:hover {
  background: var(--surface-soft);
}

.wizard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}

.stepper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 24px;
  box-shadow: var(--shadow-soft);
}

.step-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
}

.step-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
}

.step-item.done {
  color: var(--success);
}

.step-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  font-weight: 900;
}

.step-item.active .step-number {
  background: var(--primary);
  color: #fff;
}

.step-item.done .step-number {
  background: var(--success-soft);
}

.wizard-card {
  min-height: 540px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.process-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.type-card {
  position: relative;
  display: grid;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
  border-radius: 18px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.type-card:hover,
.type-card.selected {
  border-color: var(--primary);
  box-shadow: 0 16px 30px rgba(37, 99, 235, .16);
  transform: translateY(-1px);
}

.type-card strong {
  font-size: 17px;
}

.type-card span {
  color: var(--muted);
  line-height: 1.4;
}

.type-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
}

.dropzone {
  border: 2px dashed #bfdbfe;
  border-radius: 20px;
  background: #eff6ff;
  padding: 28px;
  text-align: center;
  color: #1e40af;
  transition: background .15s ease, border-color .15s ease;
}

.dropzone.dragover {
  background: #dbeafe;
  border-color: var(--primary);
}

.dropzone input {
  display: none;
}

.doc-list,
.timeline,
.mini-list {
  display: grid;
  gap: 10px;
}

.doc-item,
.timeline-item,
.mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.doc-meta,
.timeline-meta,
.mini-meta {
  display: grid;
  gap: 3px;
}

.doc-meta strong,
.timeline-meta strong,
.mini-meta strong {
  font-size: 14px;
}

.doc-meta span,
.timeline-meta span,
.mini-meta span {
  color: var(--muted);
  font-size: 12px;
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.summary-box h3 {
  margin: 0 0 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-item {
  padding: 11px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.summary-item small,
.summary-item strong {
  display: block;
}

.summary-item small {
  color: var(--muted);
  margin-bottom: 4px;
}

.chart-card canvas {
  width: 100%;
  max-height: 300px;
  border-radius: 14px;
  background: #fff;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.progress-bar {
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.modal {
  width: min(100%, 920px);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-head,
.modal-body,
.modal-foot {
  padding: 20px;
}

.modal-head,
.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
}

.modal-foot {
  border-top: 1px solid var(--line);
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow-soft);
  animation: toastIn .18s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-state {
  padding: 42px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fff;
}

.pill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}

.pill-tabs button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.print-only {
  display: none;
}

@media print {
  .sidebar,
  .topbar,
  .filter-row,
  .action-row,
  .btn,
  .small-btn,
  .wizard-actions {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .card,
  .panel,
  .metric-card {
    box-shadow: none;
  }

  .print-only {
    display: block;
  }
}

@media (max-width: 1180px) {
  .grid-4,
  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3,
  .process-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box {
    min-width: 100%;
  }
}

@media (max-width: 900px) {
  .mobile-only {
    display: grid;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--sidebar-width));
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .workspace {
    padding: 18px;
  }

  .wizard-shell {
    grid-template-columns: 1fr;
  }

  .stepper {
    position: static;
  }

  .form-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .kpi-row,
  .process-type-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .topbar-actions .btn {
    flex: 1 1 auto;
  }

  .login-card {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 14px;
  }

  .card,
  .panel,
  .metric-card {
    border-radius: 16px;
    padding: 16px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .btn {
    padding: 10px 12px;
  }

  .doc-item,
  .timeline-item,
  .mini-item,
  .card-header,
  .section-header,
  .table-header,
  .wizard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row input,
  .filter-row select {
    max-width: none;
  }
}

.document-preview-img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: #fff;
}
.document-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.muted-small {
  font-size: 12px;
  color: var(--muted);
}

/* Ajustes da versão limpa: sem tons vermelhos na identidade visual */
#logoutTopBtn { white-space: nowrap; }


/* Ajuste solicitado: saída fica no menu lateral, sem botão no topo e sem X na lateral. */
.nav-logout {
  margin-top: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.nav-logout:hover {
  background: rgba(255, 255, 255, 0.14);
}
.topbar-actions .user-menu,
#logoutTopBtn,
#closeSidebar {
  display: none !important;
}


.login-accounts {
  font-size: 12px;
  line-height: 1.55;
  max-height: 180px;
  overflow: auto;
}

/* Visual moderno inspirado no painel aprovado */
:root {
  --bg: #f6f9fd;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #081426;
  --muted: #5b6b83;
  --line: #d9e3ef;
  --primary: #0b63f6;
  --primary-dark: #084dbf;
  --primary-soft: #eaf2ff;
  --success: #10a66a;
  --success-soft: #e9fbf3;
  --warning: #f4a51c;
  --warning-soft: #fff6df;
  --danger: #ef3340;
  --danger-soft: #fff0f1;
  --purple: #7c3aed;
  --shadow: 0 18px 45px rgba(8, 20, 38, 0.08);
  --shadow-soft: 0 12px 32px rgba(8, 20, 38, 0.06);
  --radius: 18px;
  --sidebar-width: 320px;
}

body { background: var(--bg); }

.login-screen {
  background: radial-gradient(circle at 10% 10%, rgba(11,99,246,.25), transparent 28%), linear-gradient(135deg,#061427 0%,#071d3a 55%,#020b15 100%);
}

.login-card { border-radius: 28px; padding: 38px; }
.brand-logo { display: block; object-fit: contain; }
.login-logo { width: 220px; max-width: 100%; margin-bottom: 8px; filter: drop-shadow(0 16px 26px rgba(0,0,0,.20)); }
.login-brand { display: grid; gap: 8px; }
.login-brand h1 { font-size: 30px; }

.app-shell { grid-template-columns: var(--sidebar-width) 1fr; }
.sidebar {
  background: linear-gradient(180deg,#081729 0%,#061d38 55%,#03101f 100%);
  padding: 24px 18px;
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 12px 0 38px rgba(3, 12, 25, .18);
}
.sidebar-head { margin-bottom: 18px; }
.sidebar-head .brand-block { width: 100%; justify-content: center; }
.sidebar-logo { width: 250px; max-width: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); }
.brand-mark { display: none; }

.nav-menu { gap: 9px; }
.nav-item {
  color: #d8e5f8;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 750;
  font-size: 16px;
}
.nav-item span { font-size: 19px; }
.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg,rgba(13,97,231,.90),rgba(11,72,150,.70));
  box-shadow: inset 4px 0 0 #2d86ff, 0 12px 24px rgba(0, 72, 166, .22);
}
.nav-item.active { color: #fff; }
.nav-logout { margin-top: 12px; color: #ff5a66 !important; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.nav-logout:hover { background: rgba(239,51,64,.12); box-shadow: none; }

.sidebar-card {
  border-radius: 16px;
  background: linear-gradient(135deg,rgba(13,97,231,.28),rgba(37,99,235,.10));
  border: 1px solid rgba(255,255,255,.10);
}
.sidebar-card strong { line-height: 1.45; }

.workspace { padding: 0; min-height: 100vh; }
.topbar {
  min-height: 82px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
  padding: 18px 30px;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.topbar h1 { font-size: 22px; }
.topbar .eyebrow { display: none; }
.topbar-actions { gap: 14px; }
.search-box { min-width: min(430px, 34vw); }
.search-box input { height: 50px; border-radius: 12px; background: #fff; }
.avatar-btn { width: 50px; height: 50px; border-radius: 999px; background: #082c5c; color: #fff; }

.view { padding: 30px; }
.dashboard-welcome {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  margin: 0 0 24px;
}
.dashboard-welcome h2 { margin:0; font-size:32px; letter-spacing:-.04em; }
.dashboard-welcome p { margin:6px 0 0; color:var(--muted); }
.kpi-row { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap:22px; margin-bottom:24px; }
.metric-card,.card,.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: rgba(255,255,255,.96);
}
.metric-card { min-height: 150px; padding: 24px; border-left: 4px solid var(--primary); }
.metric-card:nth-child(2) { border-left-color: var(--success); }
.metric-card:nth-child(3) { border-left-color: var(--purple); }
.metric-card:nth-child(4) { border-left-color: var(--warning); }
.metric-card h3 { font-size: 27px; color: #061227; }
.metric-icon { width: 58px; height: 58px; border-radius: 999px; color:#fff; background:linear-gradient(135deg,var(--primary),#0d46ba); font-size: 22px; }
.metric-card:nth-child(2) .metric-icon { background:linear-gradient(135deg,#16a34a,#0f8f5c); }
.metric-card:nth-child(3) .metric-icon { background:linear-gradient(135deg,#8b5cf6,#6d28d9); }
.metric-card:nth-child(4) .metric-icon { background:linear-gradient(135deg,#fbbf24,#f59e0b); }
.card,.panel { padding: 24px; }
.card-header h2,.table-header h2,.section-header h2 { font-size: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.btn { border-radius: 12px; }
.btn-primary { background: linear-gradient(135deg,#0b63f6,#0747b6); box-shadow: 0 12px 26px rgba(11,99,246,.24); }
.btn-ghost { background: #fff; border: 1px solid var(--line); }
.table-wrap table { border-collapse: separate; border-spacing: 0; }
th { color:#53647c; font-size:12px; text-transform:uppercase; letter-spacing:.06em; }
td, th { border-bottom:1px solid var(--line); }
.badge { border-radius:999px; font-weight:800; }
.progress-bar { height:8px; background:#edf2f8; }
.progress-bar span { background:linear-gradient(90deg,#0b63f6,#2d86ff); }

@media (max-width: 1180px) {
  .kpi-row,.grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  :root { --sidebar-width: 280px; }
  .sidebar-logo { width: 220px; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -100%; z-index: 30; width: 290px; transition: left .2s ease; }
  .sidebar.open { left: 0; }
  .mobile-only { display: grid; }
  .topbar { padding: 14px; align-items:flex-start; }
  .topbar-actions { flex-wrap: wrap; justify-content:flex-end; }
  .search-box { min-width: 100%; order: 3; }
  .view { padding: 18px; }
  .kpi-row,.grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .dashboard-welcome { align-items:flex-start; flex-direction:column; }
}


/* AJUSTES FINAIS DA LOGO E MENU LATERAL */
html, body { overflow-x: hidden; }
:root { --sidebar-width: 286px; }
.sidebar {
  overflow-x: hidden !important;
  scrollbar-width: none;
  padding: 20px 16px !important;
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar-head {
  margin-bottom: 22px !important;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sidebar-head .brand-block {
  width: 100%;
  max-width: 224px;
  overflow: hidden;
}
.sidebar-logo {
  width: 220px !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 72px !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.25));
}
.nav-menu { overflow-x: hidden; }
.nav-item { min-width: 0; }
.nav-item span { flex: 0 0 24px; }
.workspace { min-width: 0; overflow-x: hidden; }
@media (max-width: 900px) {
  :root { --sidebar-width: 280px; }
  .sidebar-logo { width: 210px !important; max-height: 68px !important; }
}

/* CORREÇÃO SOLICITADA: remover barra lateral e preencher o fundo esquerdo */
.app-shell:not(.hidden) {
  min-height: 100vh !important;
  align-items: stretch !important;
}

.sidebar {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  align-self: stretch !important;
  gap: 14px !important;
}

.sidebar-head {
  min-height: 58px !important;
  margin-bottom: 8px !important;
}

.sidebar-logo {
  max-height: 58px !important;
}

.nav-menu {
  gap: 5px !important;
}

.nav-item {
  padding: 11px 14px !important;
  font-size: 15px !important;
}

.nav-logout {
  margin-top: 4px !important;
  padding-top: 12px !important;
}

.sidebar-card {
  margin-top: auto !important;
  padding: 16px !important;
}

.sidebar-card strong {
  margin-bottom: 10px !important;
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
  }
  .sidebar::-webkit-scrollbar { display: none !important; }
}

.category-row td {
  background: #eef5ff;
  color: #0f2744;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
}

.password-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-field input {
  flex: 1;
}
.password-field button {
  height: 44px;
  min-width: 44px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

/* Removido: botão de olho da tela de login */
#toggleLoginPassword { display: none !important; }
.metric-card h3 { display: flex; align-items: center; gap: 8px; }
.metric-edit { border: 0; background: rgba(15, 98, 254, .10); color: #0f62fe; border-radius: 10px; width: 32px; height: 32px; cursor: pointer; font-weight: 800; font-size: 16px; }
.metric-edit:hover { background: rgba(15, 98, 254, .18); }

.small-btn.danger{border-color:#fecaca;color:#dc2626;background:#fff5f5}.small-btn.danger:hover{background:#fee2e2}

/* Correções de layout e usabilidade - consórcios/vendas/clientes */
#modalRoot .modal {
  width: min(98vw, 1180px);
}
#modalRoot .modal form {
  margin: 0;
}
.installments-modal-body {
  overflow-x: auto;
}
.installments-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
}
.installments-table {
  min-width: 1240px;
  table-layout: fixed;
}
.installments-table th:nth-child(1),
.installments-table td:nth-child(1) { width: 48px; }
.installments-table th:nth-child(2),
.installments-table td:nth-child(2) { width: 180px; }
.installments-table th:nth-child(3),
.installments-table td:nth-child(3) { width: 150px; }
.installments-table th:nth-child(4),
.installments-table td:nth-child(4) { width: 140px; }
.installments-table th:nth-child(5),
.installments-table td:nth-child(5) { width: 180px; }
.installments-table th:nth-child(6),
.installments-table td:nth-child(6),
.installments-table th:nth-child(7),
.installments-table td:nth-child(7) { width: 270px; }
.installments-table input,
.installments-table select {
  min-width: 0;
  width: 100%;
  padding: 10px 11px;
}
.installments-table .parcel-money {
  min-width: 120px;
}
.attachment-cell {
  vertical-align: top;
}
.attachment-current {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.attachment-current small {
  display: block;
  max-width: 230px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.attachment-cell input[type="file"] {
  min-width: 220px;
  padding: 8px;
  font-size: 13px;
}
td .action-row {
  min-width: 230px;
}
td .small-btn {
  white-space: nowrap;
}
.table-wrap td,
.table-wrap th {
  overflow-wrap: anywhere;
}
.table-wrap td small + .small-btn,
.table-wrap td small + a.small-btn,
.table-wrap td a.small-btn {
  margin-top: 4px;
  display: inline-flex;
}
@media (max-width: 900px) {
  #modalRoot .modal { width: 98vw; }
  .modal-head, .modal-body, .modal-foot { padding: 16px; }
  .installments-table { min-width: 1180px; }
}

/* Patch final: tabelas sem esmagar, botões organizados e edição mais segura */
.table-wrap {
  overflow-x: auto;
}
.table-wrap table {
  min-width: 980px;
}
#view-clients .table-wrap table {
  min-width: 1120px;
}
#view-sales .table-wrap table {
  min-width: 1280px;
}
#view-clients td:nth-child(2),
#view-clients th:nth-child(2) {
  min-width: 180px;
  white-space: normal;
}
#view-clients td:nth-child(2) .small-btn {
  margin-top: 8px;
}
.process-action-cell {
  min-width: 92px;
}
.sale-actions-cell {
  min-width: 190px;
}
.action-row,
.sale-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  min-width: 0 !important;
}
.sale-actions .small-btn,
.action-row .small-btn {
  margin: 0 !important;
}
.modal-sales-picker table {
  min-width: 850px;
}
#modalRoot .modal {
  max-height: 96vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modalRoot .modal .modal-body {
  overflow: auto;
}
#modalRoot .modal .modal-foot,
#modalRoot .modal .modal-head {
  flex: 0 0 auto;
}
.installments-table-wrap {
  max-width: 100%;
  overflow-x: auto !important;
}
.installments-table {
  min-width: 1480px !important;
  table-layout: fixed !important;
}
.installments-table th:nth-child(1),
.installments-table td:nth-child(1) { width: 54px !important; }
.installments-table th:nth-child(2),
.installments-table td:nth-child(2) { width: 190px !important; }
.installments-table th:nth-child(3),
.installments-table td:nth-child(3) { width: 190px !important; }
.installments-table th:nth-child(4),
.installments-table td:nth-child(4) { width: 155px !important; }
.installments-table th:nth-child(5),
.installments-table td:nth-child(5) { width: 190px !important; }
.installments-table th:nth-child(6),
.installments-table td:nth-child(6),
.installments-table th:nth-child(7),
.installments-table td:nth-child(7) { width: 350px !important; }
.installments-table .parcel-money,
.installments-table input[name^="value_"] {
  min-width: 150px !important;
  width: 150px !important;
}
.installments-table input[type="file"] {
  width: 100% !important;
  min-width: 280px !important;
  max-width: 100% !important;
}
.attachment-current {
  min-height: 42px;
}
.attachment-current a.small-btn {
  width: fit-content;
}
@media (max-width: 900px) {
  #view-sales .table-wrap table,
  #view-clients .table-wrap table { min-width: 1180px; }
  .installments-table { min-width: 1420px !important; }
}


/* Correção de layout final solicitada: colunas de preço sem quebrar, modais fáceis de fechar/cancelar */
:root { --content-scale-fix: 1; }
.main-content { min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.table-wrap table { table-layout: auto; }
#inventoryTableWrap table { min-width: 1220px; }
#inventoryTableWrap th:nth-child(1), #inventoryTableWrap td:nth-child(1) { min-width: 520px; }
#inventoryTableWrap th:nth-child(2), #inventoryTableWrap td:nth-child(2) { min-width: 150px; }
#inventoryTableWrap th:nth-child(3), #inventoryTableWrap td:nth-child(3) { min-width: 115px; }
#inventoryTableWrap th:nth-child(4), #inventoryTableWrap td:nth-child(4),
#inventoryTableWrap .money-cell { min-width: 145px; width: 145px; white-space: nowrap !important; overflow-wrap: normal !important; word-break: keep-all !important; }
#inventoryTableWrap th:nth-child(5), #inventoryTableWrap td:nth-child(5),
#inventoryTableWrap .stock-cell { min-width: 110px; white-space: nowrap; }
#inventoryTableWrap th:nth-child(6), #inventoryTableWrap td:nth-child(6) { min-width: 120px; }
#inventoryTableWrap th:nth-child(7), #inventoryTableWrap td:nth-child(7) { min-width: 190px; }
.money-cell, .currency, td.money-cell { white-space: nowrap !important; overflow-wrap: normal !important; word-break: keep-all !important; }

/* Evita quebrar valores monetários em qualquer tabela */
td:nth-child(4), td:nth-child(6), td:nth-child(7), td:nth-child(8),
th:nth-child(4), th:nth-child(6), th:nth-child(7), th:nth-child(8) {
  overflow-wrap: normal;
}

#modalRoot .modal {
  width: min(96vw, 1120px) !important;
  max-height: 92vh !important;
  border-radius: 18px;
}
#modalRoot .modal .modal-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}
#modalRoot .modal .modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fff;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, .06);
}
#modalRoot .modal .modal-body {
  max-height: calc(92vh - 142px);
  overflow: auto !important;
}
#modalRoot .modal input,
#modalRoot .modal select,
#modalRoot .modal textarea {
  font-size: 15px;
}

/* Parcelas: largura confortável e rolagem horizontal sem esmagar */
.installments-table-wrap { overflow-x: auto !important; max-width: 100%; }
.installments-table { min-width: 1320px !important; table-layout: fixed !important; }
.installments-table th:nth-child(1), .installments-table td:nth-child(1) { width: 48px !important; }
.installments-table th:nth-child(2), .installments-table td:nth-child(2) { width: 175px !important; }
.installments-table th:nth-child(3), .installments-table td:nth-child(3) { width: 165px !important; }
.installments-table th:nth-child(4), .installments-table td:nth-child(4) { width: 140px !important; }
.installments-table th:nth-child(5), .installments-table td:nth-child(5) { width: 175px !important; }
.installments-table th:nth-child(6), .installments-table td:nth-child(6),
.installments-table th:nth-child(7), .installments-table td:nth-child(7) { width: 300px !important; }
.installments-table input[name^="value_"],
.installments-table .parcel-money { width: 130px !important; min-width: 130px !important; white-space: nowrap; }
.installments-table input[type="file"] { min-width: 245px !important; }

@media (max-width: 1100px) {
  .content { padding-left: 18px; padding-right: 18px; }
  #inventoryTableWrap table { min-width: 1180px; }
}

/* =========================================================
   PADRÃO FINAL DAS TABELAS - 09/06/2026
   Corrige botões quebrados, valores monetários em duas linhas
   e padroniza ações em todas as telas.
   ========================================================= */
.table-wrap {
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
}

.table-wrap table {
  width: 100%;
  min-width: 1120px;
  table-layout: auto;
}

.table-wrap th,
.table-wrap td {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.money-cell,
.table-wrap td.money-cell,
.table-wrap td:nth-child(4).money-cell,
.table-wrap td:has(.money-cell),
.table-wrap td[data-money],
#view-inventory .table-wrap td:nth-child(4),
#view-sales .table-wrap td:nth-child(6),
#view-sales .table-wrap td:nth-child(7),
#view-sales .table-wrap td:nth-child(8) {
  min-width: 130px;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* Colunas de ações padronizadas */
.table-wrap td:has(> .action-row),
.table-wrap td:has(> .sale-actions),
.sale-actions-cell,
.process-action-cell {
  white-space: nowrap !important;
  vertical-align: middle;
}

.action-row,
.sale-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: max-content !important;
  width: max-content !important;
}

.action-row .small-btn,
.sale-actions .small-btn,
.table-wrap .small-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  min-width: 76px;
  height: 38px;
  padding: 8px 12px;
  line-height: 1;
  margin: 0 !important;
}

/* Largura específica por módulo */
#view-sales .table-wrap table { min-width: 1420px; }
#view-sales .sale-actions-cell { min-width: 370px; }
#view-sales .process-action-cell { min-width: 90px; }

#view-consortia .table-wrap table { min-width: 1550px; }
#view-consortia .table-wrap td:last-child { min-width: 470px; }

#view-inventory .table-wrap table { min-width: 1240px; }
#view-inventory .table-wrap td:last-child { min-width: 270px; }
#view-inventory .table-wrap th:nth-child(4),
#view-inventory .table-wrap td:nth-child(4) {
  min-width: 140px;
  white-space: nowrap !important;
}

#view-clients .table-wrap table { min-width: 1260px; }
#view-clients .table-wrap td:last-child { min-width: 190px; }
#view-clients .table-wrap td:nth-child(3) { min-width: 170px; }

#view-processes .table-wrap table { min-width: 1360px; }
#view-processes .table-wrap td:last-child { min-width: 230px; }

#view-deliveries .table-wrap table { min-width: 1180px; }
#view-deliveries .table-wrap td:last-child { min-width: 230px; }

#view-expenses .table-wrap table { min-width: 1180px; }
#view-expenses .table-wrap td:last-child { min-width: 280px; }

#view-settings .table-wrap table { min-width: 900px; }
#view-settings .table-wrap td:last-child { min-width: 120px; }

/* Modais: cabeçalho/rodapé fixos e fechamento sempre acessível */
#modalRoot .modal {
  max-width: min(1120px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}
#modalRoot .modal .modal-head,
#modalRoot .modal .modal-foot {
  position: sticky;
  z-index: 4;
  background: #fff;
}
#modalRoot .modal .modal-head { top: 0; }
#modalRoot .modal .modal-foot { bottom: 0; }
#modalRoot .modal .modal-body {
  max-height: calc(100vh - 190px);
  overflow: auto !important;
}

@media (max-width: 900px) {
  .table-wrap table,
  #view-sales .table-wrap table,
  #view-consortia .table-wrap table,
  #view-inventory .table-wrap table,
  #view-clients .table-wrap table,
  #view-processes .table-wrap table,
  #view-deliveries .table-wrap table,
  #view-expenses .table-wrap table {
    min-width: 1100px;
  }
}

/* =========================================================
   CORREÇÃO VISUAL - CENTRAL DE CONSÓRCIOS E PENDÊNCIAS
   Ajuste feito para não cortar colunas, evitar barra desnecessária
   e organizar botões/etiquetas nas tabelas do módulo Consórcios.
   ========================================================= */
#view-consortia .panel {
  overflow: hidden;
}

#view-consortia .table-header {
  gap: 14px;
  align-items: flex-start;
}

#view-consortia .table-header .action-row {
  flex-shrink: 0;
}

#view-consortia .consortia-table-wrap {
  overflow-x: auto !important;
  overflow-y: hidden;
  max-width: 100%;
}

#view-consortia .consortia-table {
  min-width: 1480px !important;
  width: 100%;
  table-layout: fixed !important;
}

#view-consortia .consortia-table th,
#view-consortia .consortia-table td {
  padding: 12px 10px;
  vertical-align: middle;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#view-consortia .consortia-table th:nth-child(1),
#view-consortia .consortia-table td:nth-child(1) { width: 90px; min-width: 90px; white-space: nowrap; }
#view-consortia .consortia-table th:nth-child(2),
#view-consortia .consortia-table td:nth-child(2) { width: 170px; min-width: 170px; }
#view-consortia .consortia-table th:nth-child(3),
#view-consortia .consortia-table td:nth-child(3) { width: 115px; min-width: 115px; }
#view-consortia .consortia-table th:nth-child(4),
#view-consortia .consortia-table td:nth-child(4) { width: 120px; min-width: 120px; }
#view-consortia .consortia-table th:nth-child(5),
#view-consortia .consortia-table td:nth-child(5) { width: 95px; min-width: 95px; }
#view-consortia .consortia-table th:nth-child(6),
#view-consortia .consortia-table td:nth-child(6) { width: 145px; min-width: 145px; }
#view-consortia .consortia-table th:nth-child(7),
#view-consortia .consortia-table td:nth-child(7) { width: 130px; min-width: 130px; }
#view-consortia .consortia-table th:nth-child(8),
#view-consortia .consortia-table td:nth-child(8) { width: 105px; min-width: 105px; white-space: nowrap; }
#view-consortia .consortia-table th:nth-child(9),
#view-consortia .consortia-table td:nth-child(9) { width: 95px; min-width: 95px; }
#view-consortia .consortia-table th:nth-child(10),
#view-consortia .consortia-table td:nth-child(10) { width: 90px; min-width: 90px; }
#view-consortia .consortia-table th:nth-child(11),
#view-consortia .consortia-table td:nth-child(11) { width: 395px; min-width: 395px; white-space: nowrap !important; }

#view-consortia .consortia-table td:nth-child(2) strong {
  display: block;
  line-height: 1.25;
}

#view-consortia .consortia-table td:nth-child(2) small,
#view-consortia .consortia-table td:nth-child(6) small,
#view-consortia .consortia-table td:nth-child(7) small {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}

#view-consortia .consortia-table td:nth-child(11) .action-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  align-items: center !important;
  width: max-content !important;
  min-width: max-content !important;
}

#view-consortia .consortia-table td:nth-child(11) .small-btn {
  min-width: auto !important;
  height: 36px !important;
  padding: 8px 10px !important;
}

#view-consortia .pendencies-table-wrap {
  overflow-x: visible !important;
}

#view-consortia .pendencies-table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}

#view-consortia .pendencies-table th:nth-child(1),
#view-consortia .pendencies-table td:nth-child(1) { width: 22%; }
#view-consortia .pendencies-table th:nth-child(2),
#view-consortia .pendencies-table td:nth-child(2) { width: 13%; }
#view-consortia .pendencies-table th:nth-child(3),
#view-consortia .pendencies-table td:nth-child(3) { width: 48%; }
#view-consortia .pendencies-table th:nth-child(4),
#view-consortia .pendencies-table td:nth-child(4) { width: 17%; white-space: nowrap; }

#view-consortia .pendencies-table td {
  vertical-align: middle;
}

#view-consortia .pendencies-table .badge {
  margin: 3px 4px 3px 0;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #view-consortia .table-header .action-row {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  #view-consortia .table-header .btn {
    flex: 1 1 220px;
  }
  #view-consortia .pendencies-table-wrap {
    overflow-x: auto !important;
  }
  #view-consortia .pendencies-table {
    min-width: 760px !important;
  }
}

/* =========================================================
   CORREÇÃO VISUAL - ABA RELATÓRIOS
   Mais espaço para tabelas, sem colunas espremidas e sem painel lateral
   cortado no monitor/notebook.
   ========================================================= */
#view-reports .kpi-row {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
}

#view-reports .reports-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
  width: 100%;
}

#view-reports .reports-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#view-reports .report-panel {
  min-width: 0;
  overflow: hidden;
}

#view-reports .report-table-wrap {
  overflow-x: auto !important;
  max-width: 100%;
}

#view-reports .report-table {
  width: 100%;
  table-layout: fixed;
  min-width: 0 !important;
}

#view-reports .report-table th,
#view-reports .report-table td {
  padding: 12px 12px;
  vertical-align: middle;
  word-break: normal !important;
  overflow-wrap: break-word;
}

#view-reports .report-table small {
  display: block;
  margin-top: 3px;
  line-height: 1.3;
}

#view-reports .money-cell,
#view-reports .report-table td:nth-child(5) {
  white-space: nowrap !important;
  min-width: 110px;
}

#view-reports .report-installments-table th:nth-child(1),
#view-reports .report-installments-table td:nth-child(1) { width: 34%; }
#view-reports .report-installments-table th:nth-child(2),
#view-reports .report-installments-table td:nth-child(2) { width: 14%; }
#view-reports .report-installments-table th:nth-child(3),
#view-reports .report-installments-table td:nth-child(3) { width: 10%; text-align: center; }
#view-reports .report-installments-table th:nth-child(4),
#view-reports .report-installments-table td:nth-child(4) { width: 16%; white-space: nowrap; }
#view-reports .report-installments-table th:nth-child(5),
#view-reports .report-installments-table td:nth-child(5) { width: 14%; white-space: nowrap; }
#view-reports .report-installments-table th:nth-child(6),
#view-reports .report-installments-table td:nth-child(6) { width: 12%; white-space: nowrap; }

#view-reports .report-sales-pending-table,
#view-reports .report-deliveries-table,
#view-reports .report-lowstock-table {
  min-width: 780px !important;
}

#view-reports .report-lowstock-table th:nth-child(1),
#view-reports .report-lowstock-table td:nth-child(1) { width: 48%; }
#view-reports .report-lowstock-table th:nth-child(2),
#view-reports .report-lowstock-table td:nth-child(2) { width: 22%; }
#view-reports .report-lowstock-table th:nth-child(3),
#view-reports .report-lowstock-table td:nth-child(3) { width: 16%; }
#view-reports .report-lowstock-table th:nth-child(4),
#view-reports .report-lowstock-table td:nth-child(4) { width: 14%; white-space: nowrap; }

@media (max-width: 1280px) {
  #view-reports .kpi-row {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  #view-reports .reports-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #view-reports .kpi-row {
    grid-template-columns: 1fr;
  }
  #view-reports .report-installments-table {
    min-width: 760px !important;
  }
}

/* =========================================================
   LAYOUT COMPACTO E LEGÍVEL - CONSÓRCIOS/PENDÊNCIAS/METAS
   Objetivo: caber em 100% de zoom sem deixar a fonte pequena.
   ========================================================= */
#view-consortia .panel {
  padding: 18px 20px;
}
#view-consortia .table-header {
  align-items: center;
  flex-wrap: wrap;
}
#view-consortia .table-header h2 {
  font-size: 20px;
}
#view-consortia .table-header .card-subtitle {
  max-width: 780px;
}
#view-consortia .consortia-table-wrap,
#view-consortia .pendencies-table-wrap {
  overflow-x: visible !important;
}
#view-consortia .consortia-table-compact {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}
#view-consortia .consortia-table-compact th,
#view-consortia .consortia-table-compact td {
  padding: 13px 12px !important;
  font-size: 14px;
  line-height: 1.35;
  vertical-align: middle;
}
#view-consortia .consortia-table-compact th:nth-child(1),
#view-consortia .consortia-table-compact td:nth-child(1) { width: 90px !important; white-space: nowrap; }
#view-consortia .consortia-table-compact th:nth-child(2),
#view-consortia .consortia-table-compact td:nth-child(2) { width: 23% !important; }
#view-consortia .consortia-table-compact th:nth-child(3),
#view-consortia .consortia-table-compact td:nth-child(3) { width: 13% !important; }
#view-consortia .consortia-table-compact th:nth-child(4),
#view-consortia .consortia-table-compact td:nth-child(4) { width: 18% !important; }
#view-consortia .consortia-table-compact th:nth-child(5),
#view-consortia .consortia-table-compact td:nth-child(5) { width: 15% !important; }
#view-consortia .consortia-table-compact th:nth-child(6),
#view-consortia .consortia-table-compact td:nth-child(6) { width: 13% !important; }
#view-consortia .consortia-table-compact th:nth-child(7),
#view-consortia .consortia-table-compact td:nth-child(7) { width: 92px !important; }
#view-consortia .consortia-table-compact th:nth-child(8),
#view-consortia .consortia-table-compact td:nth-child(8) { width: 90px !important; white-space: nowrap !important; }
#view-consortia .consortia-table-compact strong {
  font-size: 14px;
}
#view-consortia .consortia-table-compact small {
  font-size: 12px;
  line-height: 1.35;
}
#view-consortia .compact-actions,
#view-consortia .consortia-table-compact .action-row {
  min-width: 0 !important;
  width: auto !important;
  flex-wrap: nowrap !important;
}
#view-consortia .consortia-table-compact .small-btn {
  min-width: 72px !important;
  height: 36px !important;
  padding: 8px 12px !important;
}
#view-consortia .pendencies-table-compact {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}
#view-consortia .pendencies-table-compact th,
#view-consortia .pendencies-table-compact td {
  padding: 12px !important;
  font-size: 14px;
}
#view-consortia .pendencies-table-compact th:nth-child(1),
#view-consortia .pendencies-table-compact td:nth-child(1) { width: 26% !important; }
#view-consortia .pendencies-table-compact th:nth-child(2),
#view-consortia .pendencies-table-compact td:nth-child(2) { width: 16% !important; }
#view-consortia .pendencies-table-compact th:nth-child(3),
#view-consortia .pendencies-table-compact td:nth-child(3) { width: 44% !important; }
#view-consortia .pendencies-table-compact th:nth-child(4),
#view-consortia .pendencies-table-compact td:nth-child(4) { width: 14% !important; white-space: nowrap; }
#view-consortia .pendencies-table-compact small {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
  color: var(--muted);
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.details-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-soft);
}
.details-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.details-grid strong {
  display: block;
  font-size: 15px;
}
.quick-pendencies {
  margin-top: 18px;
}
.badge-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-actions-foot {
  gap: 8px;
  flex-wrap: wrap;
}
.quick-actions-foot .btn {
  min-width: 96px;
}
#view-consortia #goalsTableWrap .table-wrap table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}
#view-consortia #goalsTableWrap th,
#view-consortia #goalsTableWrap td {
  padding: 12px !important;
  font-size: 14px;
}
#view-consortia #goalsTableWrap td:last-child .action-row {
  width: auto !important;
  min-width: 0 !important;
}

@media (max-width: 1280px) {
  #view-consortia .consortia-table-wrap,
  #view-consortia .pendencies-table-wrap {
    overflow-x: auto !important;
  }
  #view-consortia .consortia-table-compact { min-width: 980px !important; }
  #view-consortia .pendencies-table-compact { min-width: 860px !important; }
}

@media (max-width: 900px) {
  #view-consortia .panel { padding: 16px; }
  .details-grid { grid-template-columns: 1fr; }
  #view-consortia .table-header .action-row {
    width: 100% !important;
    min-width: 0 !important;
  }
  #view-consortia .table-header .btn {
    flex: 1 1 220px;
  }
}

/* Ajuste final: modal de Parcelas do Consórcio maior e tabela visível */
#modalRoot .modal:has(.installments-table-wrap) {
  width: 98vw !important;
  max-width: 1600px !important;
  max-height: 96vh !important;
}
#modalRoot .modal:has(.installments-table-wrap) .modal-body {
  padding: 22px !important;
  overflow: auto !important;
}
#modalRoot .modal:has(.installments-table-wrap) .modal-head,
#modalRoot .modal:has(.installments-table-wrap) .modal-foot {
  padding-left: 22px !important;
  padding-right: 22px !important;
}
.installments-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}
.installments-table {
  min-width: 1180px !important;
  width: 100% !important;
  table-layout: fixed !important;
}
.installments-table th,
.installments-table td {
  padding: 14px 12px !important;
  vertical-align: middle !important;
  overflow-wrap: normal !important;
}
.installments-table th:nth-child(1),
.installments-table td:nth-child(1) { width: 44px !important; }
.installments-table th:nth-child(2),
.installments-table td:nth-child(2) { width: 155px !important; }
.installments-table th:nth-child(3),
.installments-table td:nth-child(3) { width: 135px !important; }
.installments-table th:nth-child(4),
.installments-table td:nth-child(4) { width: 130px !important; }
.installments-table th:nth-child(5),
.installments-table td:nth-child(5) { width: 155px !important; }
.installments-table th:nth-child(6),
.installments-table td:nth-child(6),
.installments-table th:nth-child(7),
.installments-table td:nth-child(7) { width: 250px !important; }
.installments-table input,
.installments-table select {
  height: 44px !important;
  padding: 9px 10px !important;
  font-size: 14px !important;
}
.installments-table .parcel-money,
.installments-table input[name^="value_"] {
  min-width: 110px !important;
  width: 110px !important;
}
.installments-table input[type="file"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: 13px !important;
}
.installments-table .attachment-current {
  min-height: 34px !important;
  margin-bottom: 7px !important;
}
.installments-table .attachment-current small {
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.installments-table .attachment-current a,
.installments-table .attachment-current .small-btn {
  display: inline-flex !important;
  margin-top: 3px !important;
}
@media (max-width: 1280px) {
  #modalRoot .modal:has(.installments-table-wrap) { width: 99vw !important; }
  .installments-table { min-width: 1180px !important; }
}

/* Ajuste final do menu lateral: remove card antigo e mostra usuário logado */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  letter-spacing: .03em;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

.sidebar-user-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-user-info strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info span {
  color: #cbd5e1;
  font-size: 12px;
}

.sidebar-user-info small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sidebar-user-info small i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

.nav-menu-modern .nav-section-label {
  margin: 16px 12px 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.nav-menu-modern .nav-primary-action {
  color: #fff;
  background: rgba(37, 99, 235, .22);
  border: 1px solid rgba(96, 165, 250, .22);
}

.nav-menu-modern .nav-primary-action:hover {
  background: rgba(37, 99, 235, .35);
}

.nav-menu-modern .nav-item.active {
  background: rgba(37, 99, 235, .18) !important;
  box-shadow: inset 4px 0 0 #3b82f6;
}


/* Ajustes finais: ajuda, status e confirmações */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.help-card { padding: 22px; }
.help-steps, .help-list { margin: 12px 0 0; padding-left: 22px; color: var(--text); }
.help-steps li, .help-list li { margin: 10px 0; line-height: 1.55; }
.help-note { margin-top: 14px; }
.quick-actions-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.nav-item[data-view="help"] span { font-weight: 900; }
.badge { white-space: nowrap; }
.status-aberto, .status-pendente { background: var(--warning-soft); color: #92400e; }
.status-aprovado, .status-entregue, .status-pago { background: var(--success-soft); color: var(--success); }
.status-cancelado, .status-recusado, .status-atrasado { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 980px) { .help-grid { grid-template-columns: 1fr; } }

/* =========================================================
   AJUSTE FINAL - VENDAS SEM BARRA HORIZONTAL
   Mantém a tabela cabendo em 100% da tela, sem scroll inferior.
   ========================================================= */
#view-sales .table-wrap {
  overflow-x: hidden !important;
}

#view-sales .table-wrap table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

#view-sales .table-wrap th,
#view-sales .table-wrap td {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  padding-left: 12px;
  padding-right: 12px;
}

/* Larguras equilibradas da tabela de vendas */
#view-sales .table-wrap th:nth-child(1),
#view-sales .table-wrap td:nth-child(1) { width: 8%; }
#view-sales .table-wrap th:nth-child(2),
#view-sales .table-wrap td:nth-child(2) { width: 14%; }
#view-sales .table-wrap th:nth-child(3),
#view-sales .table-wrap td:nth-child(3) { width: 12%; }
#view-sales .table-wrap th:nth-child(4),
#view-sales .table-wrap td:nth-child(4) { width: 9%; }
#view-sales .table-wrap th:nth-child(5),
#view-sales .table-wrap td:nth-child(5) { width: 8%; }
#view-sales .table-wrap th:nth-child(6),
#view-sales .table-wrap td:nth-child(6),
#view-sales .table-wrap th:nth-child(7),
#view-sales .table-wrap td:nth-child(7),
#view-sales .table-wrap th:nth-child(8),
#view-sales .table-wrap td:nth-child(8) {
  width: 9%;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
}
#view-sales .table-wrap th:nth-child(9),
#view-sales .table-wrap td:nth-child(9) { width: 10%; }
#view-sales .table-wrap th:nth-child(10),
#view-sales .table-wrap td:nth-child(10) { width: 7%; }
#view-sales .table-wrap th:nth-child(11),
#view-sales .table-wrap td:nth-child(11) { width: 13%; }

#view-sales .sale-actions-cell,
#view-sales .process-action-cell,
#view-sales .table-wrap td:last-child {
  min-width: 0 !important;
  width: auto !important;
  white-space: normal !important;
}

#view-sales .sale-actions,
#view-sales .action-row {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

#view-sales .sale-actions .small-btn,
#view-sales .action-row .small-btn {
  min-width: 74px !important;
  height: 36px !important;
  padding: 7px 10px !important;
}

@media (max-width: 1200px) {
  #view-sales .table-wrap th,
  #view-sales .table-wrap td {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 13px;
  }
  #view-sales .sale-actions .small-btn,
  #view-sales .action-row .small-btn {
    min-width: 66px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* Ajustes finais: recibos, WhatsApp e botões compactos */
.sale-actions-cell .action-row,
.sale-actions {
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}
.sale-actions .small-btn {
  min-width: 70px;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 1280px) {
  .sale-actions-cell .action-row,
  .sale-actions { flex-wrap: wrap; }
}

/* Correção urgente: modal Editar Consórcio com rolagem real até o final */
#modalRoot .modal:has(#consortiumForm) {
  width: min(1160px, calc(100vw - 36px)) !important;
  height: min(92vh, 900px) !important;
  max-height: min(92vh, 900px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#modalRoot .modal:has(#consortiumForm) #consortiumForm {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

#modalRoot .modal:has(#consortiumForm) .modal-head,
#modalRoot .modal:has(#consortiumForm) .modal-foot {
  flex: 0 0 auto !important;
  position: relative !important;
  background: #fff !important;
  z-index: 5 !important;
}

#modalRoot .modal:has(#consortiumForm) .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 18px !important;
  scroll-padding-bottom: 80px !important;
}

#modalRoot .modal:has(#consortiumForm) textarea[name="delivery"] {
  min-height: 95px !important;
  height: 110px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}

#modalRoot .modal:has(#consortiumForm) label.span-2 {
  margin-bottom: 8px !important;
}

/* Timeline do cliente, central de documentos e resumo da loja */
.nav-item[data-view="storeSummary"],
.nav-item[data-view="documents"] {
  position: relative;
}
.client-timeline-modal { padding-bottom: 18px; }
.client-summary-grid { margin-bottom: 18px; }
.client-timeline .timeline-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line, #dbe5f1);
}
.client-timeline .timeline-dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff6ff;
}
.documents-table-wrap table th:nth-child(1), .documents-table-wrap table td:nth-child(1) { width: 110px; white-space: nowrap; }
.documents-table-wrap table th:nth-child(6), .documents-table-wrap table td:nth-child(6) { width: 120px; white-space: nowrap; }
.owner-summary-head { margin-bottom: 14px; }
.owner-summary-grid .card { min-height: 260px; }
.rank-list { display: grid; gap: 12px; }
.rank-item {
  padding: 12px;
  border: 1px solid var(--line, #dbe5f1);
  border-radius: 14px;
  background: #fff;
}
.rank-item strong { display: block; color: #0f172a; }
.rank-item span { display: block; margin: 4px 0 8px; color: #64748b; font-size: .92rem; }
.progress {
  height: 9px;
  border-radius: 999px;
  background: #eef4ff;
  overflow: hidden;
}
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b63f6, #22c55e); }
@media (max-width: 1200px) {
  .owner-summary-grid { grid-template-columns: 1fr; }
  .documents-table-wrap { overflow-x: auto; }
}

/* =========================================================
   CORREÇÃO MODAL NOVA VENDA - scroll perfeito em 100% zoom
   ========================================================= */
#modalRoot .modal {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(92vh, 900px) !important;
  height: auto !important;
  overflow: hidden !important;
}

#modalRoot .modal form#directSaleForm {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 92vh !important;
  overflow: hidden !important;
  margin: 0 !important;
}

#modalRoot .modal form#directSaleForm .modal-head,
#modalRoot .modal form#directSaleForm .modal-foot {
  flex: 0 0 auto !important;
  position: relative !important;
  background: #fff !important;
  z-index: 5 !important;
}

#modalRoot .modal form#directSaleForm .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: none !important;
  padding-bottom: 24px !important;
}

#modalRoot .modal form#directSaleForm .form-grid {
  padding-bottom: 8px;
}

/* =========================================================
   SIDEBAR COLAPSÁVEL (estável) - mais espaço na tela
   ========================================================= */

:root {
  --sidebar-w: 270px;
  --sidebar-collapsed-w: 0px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.28s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.sidebar {
  width: var(--sidebar-w);
  overflow: hidden;
  transition: width 0.28s ease, transform 0.28s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  opacity: 0;
  pointer-events: none;
  border: none;
}

/* Botão de toggle no topbar sempre visível */
#toggleSidebar {
  display: grid !important;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  background: #fff;
  color: #334155;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
#toggleSidebar:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Workspace ocupa o espaço sobrando */
.workspace {
  min-width: 0;
  width: 100%;
}

/* Mobile continua com o comportamento de overlay */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 270px !important;
    z-index: 300;
    transform: translateX(-100%);
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .app-shell.sidebar-collapsed .sidebar {
    width: 270px;
    opacity: 1;
  }
}
