/* ============================================================
   CUSTOM.CSS — FabrixERP visual estilo clean/moderno
   ============================================================ */

:root {
  --sidebar-width:     260px;
  --sidebar-collapsed: calc(44px + 2.3rem);
  --right-panel-w:     300px;
  --content-header:    52px;
  --footer-height:     48px;
  --radius-box:        10px;
  --radius-card:       14px;
  --color-dark:        #1a2332;
  --color-border:      #e9ecef;
  --color-bg:          #f4f6f9;
  --color-text:        #1a2332;
  --color-muted:       #6c757d;
  --color-primary:     #2563eb;
  --sidebar-transition: width 0.22s ease;
  --main-transition:    margin-left 0.22s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 110%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9375rem;
}

a { text-decoration: none; color: inherit; }

/* ── Layout shell ───────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar desktop (fixo, colapsável) ─────────────────────── */
.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  overflow: visible;        /* permite que a aba sobressaia */
  z-index: 200;
  transition: var(--sidebar-transition);
}

/* Conteúdo interno do sidebar esquerdo */
.app-sidebar-inner {
  position: absolute;
  inset: 0;
  background: #fff;
  border-right: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Aba de colapso (esquerdo e direito) ─────────────────────── */
.sidebar-tab {
  position: absolute;
  top: calc(var(--content-header) + 5px);
  right: -20px;             /* esquerdo: sobressai à direita */
  width: 20px;
  height: 48px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-muted);
  font-size: .72rem;
  transition: background .13s, color .13s;
  z-index: 1;
  padding: 0;
}

.sidebar-tab:hover {
  background: #f8f9fa;
  color: var(--color-dark);
}

/* Aba direita (espelho) */
.sidebar-tab-right {
  right: auto;
  left: -20px;
  border-left: 1px solid var(--color-border);
  border-right: none;
  border-radius: 6px 0 0 6px;
}

/* Estado colapsado — esconde texto, ícones não se movem */
.app-layout.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed);
}

.app-layout.sidebar-collapsed .sidebar-nav-item > span {
  opacity: 0;
  max-width: 0;
}

.app-layout.sidebar-collapsed .sidebar-user-info {
  opacity: 0;
  max-width: 0;
}

/* ── Sidebar direito (fixo desktop, fecha totalmente) ────────── */
.right-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--right-panel-w);
  overflow: visible;          /* permite que a aba sobressaia */
  z-index: 200;
  transition: width .22s ease;
}

.app-layout.right-collapsed .right-sidebar {
  width: 0;
}

/* Conteúdo interno (overflow oculto) */
.rp-inner {
  position: absolute;
  inset: 0;
  background: #fff;
  border-left: 1px solid var(--color-border);
  overflow: hidden;
}


/* ── App Main ───────────────────────────────────────────────── */
.app-main {
  margin-left: var(--sidebar-width);
  margin-right: var(--right-panel-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin-left .22s ease, margin-right .22s ease;
}

.app-layout.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-collapsed);
}

.app-layout.right-collapsed .app-main {
  margin-right: 0;
}

@media (max-width: 991.98px) {
  .app-main { margin-left: 0; margin-right: 0; }
}

/* ── Offcanvas mobile (navegação e painel) ──────────────────── */
#leftSidebar {
  width: var(--sidebar-width) !important;
  border-right: 1px solid var(--color-border);
}

#rightPanel {
  width: var(--right-panel-w) !important;
  border-left: 1px solid var(--color-border);
}

/* ── Sidebar — conteúdo interno ─────────────────────────────── */

/* Logo area */
.sidebar-logo-area {
  padding: 0.875rem 1rem 0.875rem 1.15rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.65rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e9ecef transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 2px; }


.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.33rem 0.5rem;
  border-radius: 10px;
  color: var(--color-muted);
  font-size: .9rem;
  font-weight: 400;
  margin-bottom: 2px;
  transition: background .13s, color .13s, padding .22s ease, justify-content .22s ease;
  cursor: pointer;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: #f8f9fa;
  color: var(--color-dark);
}

.sidebar-nav-item.active {
  color: var(--color-dark);
  background: #f0f2f6;
}

.sidebar-nav-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Rótulo do item de nav */
.sidebar-nav-item > span {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .15s ease, max-width .22s ease;
  max-width: 160px;
}

/* Icon box — +10%: 40px → 44px */
.sidebar-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--color-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #6c757d;
  transition: background .13s, border-color .13s, color .13s;
}

.sidebar-nav-item:hover   .sidebar-icon-box { border-color: #ced4da; color: var(--color-dark); }
.sidebar-nav-item.active  .sidebar-icon-box {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: #fff;
}

/* User section (bottom do sidebar esquerdo) */
.sidebar-user-area {
  padding: 0.875rem 0.75rem 0.875rem 1.15rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  transition: padding .22s ease, justify-content .22s ease;
}

.sidebar-user-avatar {
  width: 44px;   /* alinhado com icon-box */
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  color: var(--color-dark);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  overflow: hidden;
  transition: opacity .15s ease, max-width .22s ease;
  max-width: 160px;
}

.sidebar-user-name {
  font-size: .78rem;
  font-weight: 500;
  color: var(--color-dark);
  line-height: 1.2;
}

.sidebar-user-sub {
  font-size: .68rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 8px;
  border-radius: 20px;
  margin-top: 2px;
}

/* ── Content Header ─────────────────────────────────────────── */
.content-header {
  height: var(--content-header);
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

/* Botões de toggle dos offcanvas — +10%: 36px → 40px */
.canvas-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: background .13s, color .13s, border-color .13s;
  flex-shrink: 0;
}

.canvas-toggle-btn:hover {
  background: #f8f9fa;
  border-color: #ced4da;
  color: var(--color-dark);
}

/* Breadcrumb in header */
.content-header .breadcrumb {
  margin: 0;
  font-size: .875rem;
  align-items: center;
}

.content-header .breadcrumb-item a {
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color .13s;
}

.content-header .breadcrumb-item a:hover { color: var(--color-dark); }

.content-header .breadcrumb-item.active {
  font-weight: 600;
  color: var(--color-dark);
}

.content-header .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #ced4da;
}

.content-header .breadcrumb-close-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  border: 0;
  box-shadow: none;
  transition: color .13s;
}

.content-header .breadcrumb-close-btn:hover,
.content-header .breadcrumb-close-btn:focus-visible {
  background: transparent;
  color: var(--color-dark);
  box-shadow: none;
}

/* ── Page Content ───────────────────────────────────────────── */
.page-content {
  flex: 1;
  height: 0;
  overflow-y: auto;
  padding: 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 transparent;
}

.page-content::-webkit-scrollbar { width: 5px; }
.page-content::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 3px; }

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.app-footer {
  background: #fff;
  border-top: 1px solid var(--color-border);
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: .78rem;
  color: var(--color-muted);
  flex-shrink: 0;
}

/* ── Right Panel ─────────────────────────────────────────────── */

/* Área fixa: botão de colapso */
.rp-fixed-top {
  flex-shrink: 0;
  padding: 0.5rem 0.65rem 0;
}

/* Botão de colapso direito */
.rp-collapse-btn {
  color: var(--color-muted);
  flex-direction: row-reverse;  /* ícone à direita */
}

.rp-collapse-btn:hover {
  background: #f8f9fa;
  color: var(--color-dark);
}

.rp-collapse-btn .sidebar-icon-box {
  margin-left: auto;
}

/* Estado colapsado — direito */
.app-layout.right-collapsed .rp-fixed-top {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.app-layout.right-collapsed .rp-collapse-btn {
  justify-content: center;
  padding: 0.33rem 0;
  flex-direction: row;
}

.app-layout.right-collapsed .rp-collapse-btn .sidebar-icon-box {
  margin-left: 0;
}

.app-layout.right-collapsed .rp-user-section {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.app-layout.right-collapsed .rp-user-info {
  opacity: 0;
  max-width: 0;
}

.app-layout.right-collapsed .rp-body {
  display: none;
}

/* Perfil */
.rp-user-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  transition: padding .22s ease, justify-content .22s ease;
}

.rp-user-info {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .15s ease, max-width .22s ease;
  max-width: 200px;
}

/* Corpo rolável do painel direito */
.rp-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e9ecef transparent;
}

.rp-body::-webkit-scrollbar { width: 3px; }
.rp-body::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 2px; }

.rp-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.rp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-muted);
  margin-bottom: .75rem;
}

.rp-alert-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: .75rem;
}

.rp-alert-item:last-child { margin-bottom: 0; }

.rp-alert-icon {
  font-size: .95rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.rp-alert-title {
  font-size: .8375rem;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.2;
}

.rp-alert-desc {
  font-size: .78rem;
  color: var(--color-muted);
  margin-top: 1px;
}

.rp-quick-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .65rem;
  border-radius: 8px;
  font-size: .8375rem;
  font-weight: 500;
  color: var(--color-dark);
  margin-bottom: 2px;
  transition: background .13s;
}

.rp-quick-link i:first-child {
  font-size: 1rem;
  color: var(--color-muted);
  width: 20px;
  text-align: center;
}

.rp-quick-link:hover {
  background: #f8f9fa;
  color: var(--color-dark);
}

.rp-footer {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.rp-footer-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem .65rem;
  border-radius: 8px;
  font-size: .8375rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: background .13s, color .13s;
}

.rp-footer-link i { font-size: 1rem; }

.rp-footer-link:hover {
  background: #f8f9fa;
  color: var(--color-dark);
}

.rp-footer-link.text-danger { color: #dc3545 !important; }
.rp-footer-link.text-danger:hover { background: #fff5f5; }

/* ── Module Cards (settings page) ───────────────────────────── */
.modules-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modules-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: .8375rem;
  color: var(--color-muted);
  min-width: 200px;
}

.modules-filter i { font-size: 1rem; }

.modules-filter input {
  border: none;
  outline: none;
  background: transparent;
  font-size: .8375rem;
  color: var(--color-dark);
  flex: 1;
  min-width: 0;
}

.modules-filter input::placeholder { color: var(--color-muted); }

.view-toggle-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: background .13s, color .13s, border-color .13s;
}

.view-toggle-btn:hover,
.view-toggle-btn.active {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: #fff;
}

.module-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem 1rem 1.5rem;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  text-decoration: none;
  color: var(--color-dark);
  height: 100%;
}

.module-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.07);
  transform: translateY(-2px);
  border-color: #dde2eb;
  text-decoration: none;
  color: var(--color-dark);
}

.module-icon-box {
  width: 76px;
  height: 76px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: #fff;
  transition: border-color .15s;
}

.module-card:hover .module-icon-box { border-color: #ced4da; }

.module-icon-box i {
  font-size: 1.9rem;
  color: var(--color-dark);
}

.module-label {
  font-size: .8375rem;
  font-weight: 600;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.35;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow .15s;
}

.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-box);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  color: #fff;
}

.stat-icon.blue   { background: #2563eb; }
.stat-icon.green  { background: #059669; }
.stat-icon.orange { background: #d97706; }
.stat-icon.purple { background: #7c3aed; }

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1;
  letter-spacing: -.4px;
}

.stat-label {
  font-size: .8rem;
  color: var(--color-muted);
  margin-top: .25rem;
}

.stat-trend {
  font-size: .72rem;
  font-weight: 600;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: .3rem;
}

/* ── App Card (generic) ─────────────────────────────────────── */
.app-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.app-card > .card-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: .875rem 1.25rem;
  font-weight: 700;
  font-size: .9375rem;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-card > .card-footer {
  background: #f8f9fa;
  border-top: 1px solid var(--color-border);
  padding: .65rem 1.25rem;
}

/* ── Table ──────────────────────────────────────────────────── */
.table {
  font-size: .875rem;
  margin: 0;
}

.table thead th {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-muted);
  background: #f8f9fa;
  border-bottom: 2px solid var(--color-border);
  padding: .65rem 1.25rem;
  white-space: nowrap;
}

.table tbody td {
  padding: .75rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f5;
}

.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover td { background: #f8f9ff; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge-soft-success  { background: #d1fae5; color: #065f46; }
.badge-soft-warning  { background: #fef3c7; color: #92400e; }
.badge-soft-danger   { background: #fee2e2; color: #991b1b; }
.badge-soft-info     { background: #dbeafe; color: #1e40af; }
.badge-soft-secondary{ background: #f1f3f5; color: #6c757d; }

/* ── Buttons ─────────────────────────────────────────────────── */
/* Botões de ação — +10% padding e font-size */
.btn-dark-custom {
  background: var(--color-dark);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: .44rem .99rem;
  font-size: .92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: opacity .13s;
  cursor: pointer;
}

.btn-dark-custom:hover { opacity: .85; color: #fff; }

.btn-outline-custom {
  background: #fff;
  color: var(--color-dark);
  border: 1px solid var(--color-border);
  border-radius: 9px;
  padding: .44rem .99rem;
  font-size: .92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: background .13s, border-color .13s;
  cursor: pointer;
}

.btn-outline-custom:hover {
  background: #f8f9fa;
  border-color: #ced4da;
}

.btn-check:checked + .btn-outline-custom,
.btn-check:active + .btn-outline-custom,
.btn-outline-custom.active,
.btn-outline-custom.dropdown-toggle.show {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-check:focus + .btn-outline-custom,
.btn-outline-custom:focus {
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.btn-check:disabled + .btn-outline-custom,
.btn-outline-custom.disabled,
.btn-outline-custom:disabled {
  opacity: .65;
  pointer-events: none;
}

/* Bootstrap primary palette aligned with theme */
.btn-primary {
  --bs-btn-bg: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: color-mix(in srgb, var(--color-primary) 88%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--color-primary) 88%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--color-primary) 78%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--color-primary) 78%, #000);
  --bs-btn-disabled-bg: color-mix(in srgb, var(--color-primary) 65%, #fff);
  --bs-btn-disabled-border-color: color-mix(in srgb, var(--color-primary) 65%, #fff);
}

.btn-outline-primary {
  --bs-btn-color: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: var(--color-primary);
  --bs-btn-hover-border-color: var(--color-primary);
  --bs-btn-active-bg: color-mix(in srgb, var(--color-primary) 85%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--color-primary) 85%, #000);
  --bs-btn-disabled-color: color-mix(in srgb, var(--color-primary) 60%, #fff);
  --bs-btn-disabled-border-color: color-mix(in srgb, var(--color-primary) 60%, #fff);
}

.text-primary,
.link-primary {
  color: var(--color-primary) !important;
}

.link-primary:hover,
.link-primary:focus {
  color: color-mix(in srgb, var(--color-primary) 85%, #000) !important;
}

.bg-primary {
  background-color: var(--color-primary) !important;
}

.border-primary {
  border-color: var(--color-primary) !important;
}

/* ── Progress ───────────────────────────────────────────────── */
.progress {
  height: 5px;
  border-radius: 3px;
  background: #e9ecef;
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
}

.empty-state i {
  font-size: 3rem;
  color: #dee2e6;
  display: block;
  margin-bottom: 1rem;
}

.empty-state h5 { color: var(--color-dark); font-weight: 700; }

/* ── Error Pages ────────────────────────────────────────────── */
.error-page-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}
.error-page-icon.muted  { color: #dee2e6; }
.error-page-icon.danger { color: #fa5252; }
.error-page-desc        { font-size: .875rem; }

/* ── Table search (inline na card-header) ───────────────────── */
.table-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #f8f9fa;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: .35rem .75rem;
}

.table-search i { font-size: .9rem; }

.table-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .8375rem;
  width: 160px;
}

.pagination-info { font-size: .8rem; }

/* ── Module list view ───────────────────────────────────────── */
.module-list-item {
  cursor: pointer;
  font-size: .875rem;
}

.module-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.module-list-icon i  { font-size: 1.1rem; }
.module-list-chevron { font-size: .8rem; }

/* ── Dashboard ──────────────────────────────────────────────── */
.btn-xs {
  font-size: .78rem;
  padding: .25rem .7rem;
}

.prod-line-label { font-size: .8rem; }

.alert-icon  { flex-shrink: 0; }
.alert-title { font-size: .8375rem; }
.alert-desc  { font-size: .78rem; }

/* Select / Selectmultiple */
.form-select {
  --bs-form-select-focus-border-color: var(--color-primary);
  --bs-form-select-focus-box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.form-select option {
  background-color: #fff;
  color: var(--color-text);
}

.form-select option:checked,
.form-select option:hover {
  background-color: var(--color-primary);
  color: #fff;
}

select.form-select[multiple] option:checked {
  background: linear-gradient(var(--color-primary), var(--color-primary));
  color: #fff;
}

/* Dropdown menu items — use theme color instead of Bootstrap blue */
.dropdown-item {
  color: var(--color-text) !important;
  background-color: transparent !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: color-mix(in srgb, var(--color-primary) 15%, transparent) !important;
  color: var(--color-text) !important;
}
.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--color-primary) !important;
  color: #fff !important;
}
.dropdown-item.disabled,
.dropdown-item:disabled {
  color: var(--color-muted) !important;
  background-color: transparent !important;
}

/* Extra specificity for button.dropdown-item */
button.dropdown-item {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: var(--color-text) !important;
  background-color: transparent !important;
}
button.dropdown-item:hover,
button.dropdown-item:focus {
  background-color: color-mix(in srgb, var(--color-primary) 15%, transparent) !important;
  color: var(--color-text) !important;
}
button.dropdown-item.active,
button.dropdown-item:active {
  background-color: var(--color-primary) !important;
  color: #fff !important;
}

/* Remove spacing from dropdown-menu with only dropdown-items */
.dropdown-menu.position-static {
  padding: 0 !important;
}

/* Dual range (duas bolinhas no mesmo trilho) */
.slider-field-vertical {
  position: relative;
  width: 2rem;
  height: 170px;
  margin: 0;
}

.slider-field {
  position: relative;
}

.slider-field-show-value:not(.slider-field-vertical) {
  margin-bottom: 2.15rem;
}

.slider-field-vertical .slider-vertical-input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}

.slider-value-badge,
.range-value-badge {
  position: absolute;
  z-index: 6;
  min-width: 2rem;
  padding: .1rem .35rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: .72rem;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.dual-range {
  position: relative;
  height: 30px;
}

.dual-range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: .5rem;
  border-radius: 999px;
  background: var(--color-border);
  z-index: 1;
}

.dual-range-selected {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: .5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-primary) 70%, #fff);
  z-index: 2;
}

.range-field-vertical .dual-range {
  width: 30px;
  height: 170px;
  margin: 0;
}

.range-field-show-value:not(.range-field-vertical) {
  margin-bottom: 2.65rem;
}

.range-field-vertical .dual-range-track {
  top: 0;
  bottom: 0;
  left: 50%;
  right: auto;
  width: .5rem;
  height: auto;
  transform: translateX(-50%);
}

.range-field-vertical .dual-range-selected {
  top: auto;
  left: 50%;
  width: .5rem;
  transform: translateX(-50%);
}

.dual-range-input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

.range-field-vertical .dual-range-input {
  top: 50%;
  left: 50%;
  width: 170px;
  height: 30px;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}

.dual-range-start { z-index: 3; }
.dual-range-end { z-index: 4; }

.dual-range-input::-webkit-slider-runnable-track {
  height: .5rem;
  background: transparent;
  border: 0;
}

.dual-range-input::-moz-range-track {
  height: .5rem;
  background: transparent;
  border: 0;
}

.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  border: 0;
  margin-top: calc((.5rem - 1rem) / 2);
  pointer-events: auto;
}

.dual-range-input::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  border: 0;
  pointer-events: auto;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .page-content { padding: 1.25rem; }
  .content-header { padding: 0 .875rem; }
}

@media (max-width: 575.98px) {
  .page-content { padding: 1rem; }
  .modules-filter { min-width: 140px; }
  .stat-value { font-size: 1.35rem; }
  .app-footer .footer-right { display: none; }
}
