:root {
  --cor_sidebar: #ffffff;
  --cor_borda_sidebar: #e2e8f0;
  --cor_fundo: #f4f5fb;
  --cor_texto_principal: #111827;
  --cor_texto_suave: #6b7280;
  --cor_icone: #2f3a45;
  --cor_base: #2f3a45;
  --cor_base_hover: #24303a;
  --cor_primaria: #f63914;
  --cor_primaria_hover: #d92f10;
  --cor_primaria_soft: rgba(246, 57, 20, 0.1);
  --sombra_card: 0 16px 40px rgba(15, 23, 42, 0.06);
  --radius_card: 12px;
  --radius_input: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, #fdf4ff 0, #f4f5fb 40%, #eef2ff 100%);
  color: var(--cor_texto_principal);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

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

button,
.btn {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--cor_primaria);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  transition: background 0.16s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

button:hover,
.btn:hover {
  background: var(--cor_primaria_hover);
  transform: translateY(-1px);
}

.btn.ghost {
  background: #ffffff;
  color: var(--cor_base);
  border: 1px solid var(--cor_borda_sidebar);
}

.btn.ghost:hover {
  background: #f8fafc;
  color: var(--cor_primaria);
}

.app_shell {
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding: 26px 28px 32px 100px;
}

/* Sidebar igual ao desktop */
.barra_lateral {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 1100;
  pointer-events: none;
}

.barra_lateral_interna {
  position: absolute;
  inset: 0;
  width: 70px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: var(--cor_sidebar);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  transition: width 0.22s ease;
  overflow: hidden;
  pointer-events: auto;
}

.barra_lateral_interna:hover {
  width: 260px;
}

.area_logo {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo_marca_mini {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: var(--cor_primaria);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  flex-shrink: 0;
}

.logo_marca_mini i {
  font-size: 1.25rem;
}

.logo_marca_full {
  display: none;
  opacity: 0;
  color: var(--cor_texto_principal);
  font-size: 1rem;
  font-weight: 850;
  white-space: nowrap;
  transform: translateX(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo_marca_full strong {
  color: var(--cor_primaria);
}

.barra_lateral_interna:hover .logo_marca_mini {
  display: none;
}

.barra_lateral_interna:hover .logo_marca_full {
  display: inline-flex;
  opacity: 1;
  transform: translateX(0);
}

.linha_divisoria {
  height: 1px;
  margin: 10px 0 8px;
  background: #e5e7eb;
}

.menu_principal {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0 40px;
  scrollbar-width: none;
}

.menu_principal::-webkit-scrollbar {
  width: 0;
}

.barra_lateral_interna:hover .menu_principal {
  align-items: stretch;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}

.barra_lateral_interna:hover .menu_principal::-webkit-scrollbar {
  width: 3px;
}

.barra_lateral_interna:hover .menu_principal::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 999px;
}

.titulo_sessao {
  margin: 0;
  padding: 6px 6px 4px;
  color: var(--cor_texto_suave);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.barra_lateral_interna:not(:hover) .titulo_sessao {
  display: none;
}

.barra_lateral_interna:hover .titulo_sessao {
  opacity: 1;
  transform: translateX(0);
}

.barra_lateral_interna:not(:hover) .menu_principal {
  align-items: center;
}

.item_menu {
  width: 43px;
  min-height: 43px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  color: var(--cor_icone);
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  transition: background 0.16s ease, color 0.16s ease, transform 0.08s ease;
}

.barra_lateral_interna:hover .item_menu {
  width: 100%;
  max-height: 43px;
  margin: 0;
  padding: 5px 10px;
  justify-content: flex-start;
  aspect-ratio: auto;
}

.item_menu i {
  width: 32px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.02rem;
  flex-shrink: 0;
}

.texto_item_menu {
  flex: 1;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.barra_lateral_interna:hover .texto_item_menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.item_menu:hover,
.item_menu_ativo {
  background: var(--cor_primaria);
  color: #ffffff;
}

.area_usuario {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.usuario_btn {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar_usuario {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--cor_primaria);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.info_usuario {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  line-height: 0.9rem;
  opacity: 0;
  transform: translateX(-8px);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.barra_lateral_interna:hover .info_usuario {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.info_usuario_nome {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cor_texto_principal);
  font-weight: 650;
}

.info_usuario_papel {
  color: var(--cor_texto_suave);
  font-size: 0.74rem;
}

.botao_mini {
  border: none;
  background: transparent;
  color: var(--cor_texto_suave);
  cursor: pointer;
  font-size: 1rem;
  display: none;
}

.barra_lateral_interna:hover .botao_mini {
  display: inline-flex;
}

.botao_mini:hover {
  color: #ef4444;
}

/* Conteudo */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 4px;
  color: var(--cor_texto_principal);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-head p,
.auth-card p,
.error-card p {
  margin: 0;
  color: var(--cor_texto_suave);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--cor_primaria);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel,
.card,
.auth-card,
.form-card,
.error-card {
  background: var(--cor_sidebar);
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: var(--radius_card);
  box-shadow: var(--sombra_card);
}

.panel {
  padding: 15px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  min-height: 96px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
  transition: border-color 0.16s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.card strong {
  color: var(--cor_texto_principal);
  font-size: 15px;
}

.card span {
  color: var(--cor_texto_suave);
  font-size: 13px;
}

.card:hover {
  border-color: rgba(246, 57, 20, 0.35);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.auth-card,
.error-card {
  width: min(460px, calc(100vw - 32px));
  margin: 8vh auto;
  padding: 28px;
}

.auth-card h1,
.error-card h1 {
  margin: 0 0 8px;
  font-size: 25px;
}

form {
  margin: 0;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

label small {
  color: var(--cor_texto_suave);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  border-radius: var(--radius_input);
  padding: 10px 12px;
  background: #ffffff;
  color: var(--cor_texto_principal);
  font: inherit;
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cor_primaria);
  box-shadow: 0 0 0 1px rgba(247, 139, 45, 0.2);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar input {
  max-width: 420px;
}

.table-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--cor_texto_suave);
  font-size: 12px;
}

/* Tabulator no padrao do ecletech_api */
.tabela_padrao {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cor_borda_sidebar);
  background: var(--cor_sidebar);
}

.tabela_padrao .tabulator,
.master-tabulator.tabulator {
  border: none;
  background: var(--cor_sidebar);
  color: var(--cor_texto_principal);
  font-size: 0.85rem;
}

.tabela_padrao .tabulator-header {
  background: linear-gradient(90deg, rgba(253, 253, 253, 0.98), rgba(243, 246, 255, 0.98));
  border-bottom: 1px solid var(--cor_borda_sidebar);
}

.tabela_padrao .tabulator-col,
.master-tabulator .tabulator-col {
  background: #2f3a45 !important;
  color: #ffffff !important;
  border-right: 1px solid rgba(226, 232, 240, 0.22) !important;
  font-weight: 650;
}

.tabela_padrao .tabulator-header .tabulator-col .tabulator-col-title,
.master-tabulator .tabulator-col-title {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 750;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  padding-top: 5px;
}

.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {
  border-bottom: 6px solid #ffffff;
}

.tabela_padrao .tabulator-row {
  background: var(--cor_sidebar);
  border-bottom: 1px solid rgba(241, 245, 249, 0.9);
  color: var(--cor_texto_principal);
}

.tabela_padrao .tabulator-row:nth-child(odd) {
  background: #ffffff;
}

.tabela_padrao .tabulator-row:nth-child(even) {
  background: #f3f4f6;
}

.tabela_padrao .tabulator-row:hover {
  background: rgba(255, 117, 18, 0.27) !important;
}

.tabulator-row .tabulator-cell {
  border-right: 1px solid #e2e8f0;
}

.tabulator .tabulator-tableholder .tabulator-table {
  width: 100%;
}

.tabulator .tabulator-footer {
  background: #2f3a45;
  color: #ffffff;
  border-top: 1px solid var(--cor_borda_sidebar);
}

.tabulator .tabulator-footer .tabulator-page,
.tabulator .tabulator-footer .tabulator-page-size {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #ffffff;
  color: var(--cor_base);
  border-radius: 8px;
}

.master-tabulator .tabulator-header-filter input {
  min-height: 28px;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.row-actions form {
  display: inline;
}

.mini-btn {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  color: #2f3a45;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.mini-btn:hover {
  background: rgba(47, 58, 69, 0.08);
  color: var(--cor_primaria);
}

.mini-btn.danger {
  background: transparent;
  color: #dc2626;
}

.mini-btn.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.form-card {
  max-width: 980px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}

.form-card button {
  grid-column: 1 / -1;
  justify-self: start;
}

.error-card .btn {
  margin-top: 12px;
}

.notiflix-notify {
  border-radius: 12px !important;
}

@media (max-width: 920px) {
  .barra_lateral {
    position: static;
    width: 100%;
    height: auto;
    pointer-events: auto;
  }

  .barra_lateral_interna,
  .barra_lateral_interna:hover {
    position: static;
    width: 100%;
    height: auto;
    max-height: 320px;
  }

  .barra_lateral_interna .menu_principal,
  .barra_lateral_interna:hover .menu_principal {
    align-items: stretch;
    padding-right: 8px;
  }

  .barra_lateral_interna .logo_marca_mini {
    display: none;
  }

  .barra_lateral_interna .logo_marca_full {
    display: inline-flex;
    opacity: 1;
    transform: none;
  }

  .barra_lateral_interna .titulo_sessao,
  .barra_lateral_interna .texto_item_menu,
  .barra_lateral_interna .info_usuario {
    display: inline-flex;
    opacity: 1;
    transform: none;
  }

  .barra_lateral_interna .item_menu {
    width: 100%;
    aspect-ratio: auto;
    justify-content: flex-start;
    padding: 5px 10px;
  }

  .main {
    padding: 18px;
  }

  .page-head,
  .toolbar,
  .table-meta {
    display: grid;
  }

  .form-card {
    grid-template-columns: 1fr;
  }
}

/* Overrides finais copiados do comportamento visual do desktop ecletech_api */
body {
  background: #f5f5f5;
  overflow-y: auto;
}

.app_shell {
  min-height: 100vh;
  background: #f5f5f5;
}

.conteudo_principal.main {
  margin-left: 70px;
  min-height: 100vh;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f5f5f5;
}

.topo_pagina {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.titulo_pagina {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
}

.titulo_pagina h1 {
  margin: 0;
  color: #111827;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.box_icon {
  width: 56px;
  height: 56px;
  margin-left: 5px;
  border-radius: 14px;
  background: #f63914;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon_title {
  color: #ffffff;
  font-size: 1.45rem;
}

.acoes_topo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btns_container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn_acao {
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border: none;
  border-radius: 14px;
  background: #009b3a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.btn_acao:hover {
  background: #008334;
  transform: translateY(-1px);
}

.btn_acao i {
  color: #ffffff;
  font-size: 1.9rem;
}

.card_tabela {
  background: #ffffff;
  border: 1px solid var(--cor_borda_sidebar);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card_tabela_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card_tabela_header h2 {
  margin: 0;
  color: #111827;
  font-size: 1.8rem;
  line-height: 1.12;
  font-weight: 700;
}

.card_tabela_subtitulo {
  display: block;
  margin-top: 4px;
  color: #5f6b7a;
  font-size: 1.15rem;
  line-height: 1.2;
}

.toolbar_tabela {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.toolbar_tabela input {
  width: min(568px, 100%);
  max-width: 568px;
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid #b8c6d8;
  padding: 0 18px;
  color: #111827;
  font-size: 1.05rem;
}

.btn_pesquisar,
.btn_limpar {
  min-height: 58px;
  border-radius: 14px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.btn_pesquisar {
  background: #f63914;
  color: #ffffff;
}

.btn_pesquisar:hover {
  background: #d92f10;
}

.btn_limpar {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d9e1ea;
}

.btn_limpar:hover {
  background: #f8fafc;
  color: #111827;
}

.table-meta {
  margin: -2px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5f6b7a;
  font-size: 0.95rem;
}

.tabela_padrao {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cor_borda_sidebar);
  background: #ffffff;
}

.tabela_padrao .tabulator {
  border: none;
  background: #ffffff;
  color: #00112a;
  font-size: 1.02rem;
}

.tabela_padrao .tabulator-header {
  background: #2f3a45;
  border-bottom: 1px solid var(--cor_borda_sidebar);
}

.tabela_padrao .tabulator-col {
  min-height: 42px;
  background: #2f3a45 !important;
  color: #ffffff !important;
  border-right: 1px solid rgba(226, 232, 240, 0.8) !important;
  font-weight: 700;
}

.tabela_padrao .tabulator-header .tabulator-col .tabulator-col-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.master-tabulator .tabulator-header-filter input {
  height: 37px;
  min-height: 37px;
  border-radius: 9px;
  border: 1px solid #b8c6d8;
  padding: 6px 9px;
  background: #ffffff;
  font-size: 0.9rem;
}

.tabela_padrao .tabulator-row {
  min-height: 54px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.9);
  color: #00112a;
}

.tabela_padrao .tabulator-row:nth-child(odd) {
  background: #ffffff;
}

.tabela_padrao .tabulator-row:nth-child(even) {
  background: #f0f1f3;
}

.tabela_padrao .tabulator-row:hover {
  background: rgba(255, 117, 18, 0.27) !important;
}

.tabulator-row .tabulator-cell {
  min-height: 54px;
  border-right: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
}

.tabulator .tabulator-footer {
  min-height: 60px;
  padding: 10px 18px;
  background: #2f3a45;
  color: #ffffff;
  border-top: 1px solid #2f3a45;
}

.tabulator .tabulator-footer .tabulator-page-size {
  width: auto;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
}

.row-actions {
  gap: 14px;
}

.mini-btn {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: none;
  color: #2f3a45;
  font-size: 0;
}

.mini-btn i {
  font-size: 1.25rem;
}

.mini-btn:hover {
  background: transparent;
  color: #f63914;
}

.mini-btn.danger {
  background: transparent;
  color: #dc2626;
}
