/* ================================================================
   SYSPDV Web - Estilo Global
   ================================================================ */

:root {
  --pdv-primary:   #1a56db;
  --pdv-dark:      #111827;
  --pdv-sidebar:   #1e2433;
  --pdv-accent:    #f97316;
}

/* ----------------------------------------------------------------
   Tela de Login
   ---------------------------------------------------------------- */
.login-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  padding: 0 1rem;
}

.login-logo-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.login-logo-circle i {
  font-size: 2.2rem;
  color: #fff;
}

.login-card {
  border-radius: 16px;
  background: #ffffff;
}

.login-card .form-select,
.login-card .form-control {
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  background-color: #f9fafb;
  transition: border-color .2s, box-shadow .2s;
}

.login-card .form-select:focus,
.login-card .form-control:focus {
  border-color: var(--pdv-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .15);
  background-color: #fff;
}

.login-card .btn-primary {
  background-color: var(--pdv-primary);
  border-color: var(--pdv-primary);
  border-radius: 8px;
  letter-spacing: .3px;
}

.login-card .btn-primary:hover {
  background-color: #1648c0;
  border-color: #1648c0;
}

/* ----------------------------------------------------------------
   Tela de seleção de empresa
   ---------------------------------------------------------------- */
.sel-wrapper {
  width: 100%;
  max-width: 680px;
  padding: 0 1rem;
}

.empresa-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.empresa-card:hover {
  border-color: var(--pdv-primary);
  box-shadow: 0 6px 20px rgba(26,86,219,.18);
  transform: translateY(-2px);
}

.empresa-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pdv-primary);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.empresa-card-nome {
  font-weight: 600;
  font-size: .95rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empresa-card-cnpj {
  font-size: .78rem;
  color: #6b7280;
  letter-spacing: .3px;
}

.empresa-card-arrow {
  font-size: 1.4rem;
  color: #d1d5db;
  flex-shrink: 0;
  transition: color .2s;
}

.empresa-card:hover .empresa-card-arrow {
  color: var(--pdv-primary);
}

.empresa-card-badge {
  background: #eff6ff;
  color: var(--pdv-primary);
  font-size: .72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
}

/* ----------------------------------------------------------------
   Autocomplete de empresa
   ---------------------------------------------------------------- */
.empresa-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 480px;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.empresa-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: .95rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}

.empresa-item:last-child { border-bottom: none; }

.empresa-item:hover { background-color: #eff6ff; }
.empresa-item:hover .empresa-nome { color: var(--pdv-primary); }

.empresa-item.disabled {
  color: #9ca3af;
  cursor: default;
  font-style: italic;
}

.empresa-nome {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empresa-cnpj {
  display: block;
  font-size: .78rem;
  color: #6b7280;
  letter-spacing: .3px;
}

/* ----------------------------------------------------------------
   Campo de busca na tela de seleção de empresa
   ---------------------------------------------------------------- */
.sel-search-wrap {
  position: relative;
}

.sel-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  pointer-events: none;
}

.sel-search-input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, background .2s;
}

.sel-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.sel-search-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

/* ----------------------------------------------------------------
   Utilitários gerais (usados nos outros módulos)
   ---------------------------------------------------------------- */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f3f4f6;
  color: #374151;
}

.text-uppercase.small {
  letter-spacing: .5px;
}

/* ================================================================
   Layout do app autenticado - estilo Gentelella
   ================================================================ */
:root {
  --g-sidebar:        #2A3F54;
  --g-sidebar-darker: #172D44;
  --g-accent:         #1ABB9C;
  --g-bg:             #F7F7F7;
  --g-card-border:    #E6E9ED;
  --g-text:           #73879C;
  --g-text-light:     rgba(255,255,255,.75);
  --g-section-label:  rgba(255,255,255,.4);
}

.app-body {
  background: var(--g-bg);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #333;
}

.app-shell { display: flex; min-height: 100vh; }

/* ---------------- Sidebar ---------------- */
.g-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 230px;
  background: var(--g-sidebar);
  color: var(--g-text-light);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  overflow-y: auto;
  transition: transform .25s ease;
  font-size: 13px;
}

/* Scrollbar customizada (WebKit: Chrome/Edge/Safari) */
.g-sidebar::-webkit-scrollbar { width: 8px; }
.g-sidebar::-webkit-scrollbar-track {
  background: rgba(0,0,0,.18);
  border-radius: 0;
}
.g-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 4px;
  transition: background .15s;
}
.g-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--g-accent);
}

/* Firefox */
.g-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) rgba(0,0,0,.18);
}

.g-sidebar-brand {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.g-sidebar-brand a {
  color: #ECF0F1;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}

.g-sidebar-brand i {
  color: var(--g-accent);
  font-size: 22px;
}

.g-profile {
  padding: 18px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.g-profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ECF0F1;
  font-size: 30px;
  flex-shrink: 0;
}

.g-profile-info span {
  display: block;
  font-size: 13px;
  color: var(--g-section-label);
  margin-bottom: 3px;
}

.g-profile-info h2 {
  font-size: 15px;
  margin: 0;
  color: #ECF0F1;
  font-weight: 600;
  letter-spacing: .2px;
}

/* Badges Hot/Novo do menu */
.g-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  letter-spacing: .3px;
}
.g-badge-hot { background: #E74C3C; color: #fff; }
.g-badge-new { background: var(--g-accent); color: #fff; }

.g-menu {
  padding: 8px 0 12px;
  flex: 1;
}

.g-menu-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--g-section-label);
  padding: 16px 16px 6px 16px;
  margin: 0;
  font-weight: 600;
}

.g-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.g-menu > ul > li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--g-text-light);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}

.g-menu > ul > li > a > i:first-child {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.g-menu > ul > li > a:hover {
  background: var(--g-sidebar-darker);
  color: #fff;
}

.g-menu > ul > li.active > a,
.g-menu > ul > li.open > a {
  background: var(--g-sidebar-darker);
  border-left-color: var(--g-accent);
  color: #fff;
}

.g-menu > ul > li > a > span { flex: 1; }

.g-caret {
  font-size: 10px !important;
  width: auto !important;
  transition: transform .2s;
  opacity: .7;
}

.g-has-sub.open > a .g-caret { transform: rotate(180deg); }

.g-submenu {
  background: rgba(0,0,0,.18);
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}

.g-has-sub.open > .g-submenu { max-height: 500px; }

.g-submenu li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px 9px 49px;
  color: var(--g-text-light);
  text-decoration: none;
  font-size: 12.5px;
  transition: background .15s, color .15s;
}

.g-submenu li > a:hover {
  background: rgba(0,0,0,.25);
  color: #fff;
}

.g-submenu li > a.active {
  background: rgba(26, 187, 156, .12);
  color: var(--g-accent);
  font-weight: 500;
}

/* Submenu aninhado (3º nível) */
.g-submenu .g-submenu {
  background: rgba(0,0,0,.25);
}

.g-submenu .g-submenu li > a {
  padding: 8px 16px 8px 65px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
}

.g-submenu .g-submenu li > a:hover {
  background: rgba(0,0,0,.35);
  color: #fff;
}

.g-submenu .g-submenu li > a.active {
  color: var(--g-accent);
}

.g-submenu .g-has-sub > a .g-caret {
  font-size: 10px;
}

.g-sidebar-footer {
  padding: 0;
  background: #1A2A3A;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(0,0,0,.2);
  position: sticky;
  bottom: 0;
}

.g-sidebar-footer a {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: background .15s, color .15s;
  font-size: 16px;
  border-right: 1px solid rgba(0,0,0,.2);
}

.g-sidebar-footer a:last-of-type { border-right: 0; }
.g-sidebar-footer a:hover { background: rgba(0,0,0,.25); color: #fff; }

.g-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1040;
  display: none;
}

.g-sidebar-backdrop.show { display: block; }

/* ---------------- Topbar ---------------- */
.g-topbar {
  background: #fff;
  border-bottom: 1px solid #E6E9ED;
  display: flex;
  align-items: center;
  padding: 0 18px;
  min-height: 57px;
  position: sticky;
  top: 0;
  z-index: 1020;
  gap: 14px;
}

.g-sidebar-toggle {
  background: transparent;
  border: 0;
  font-size: 22px;
  color: #73879C;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.g-sidebar-toggle:hover { background: #F2F5F7; }

.g-topbar-empresa {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #2A3F54;
  font-size: 14px;
}

.g-topbar-empresa i { color: var(--g-accent); font-size: 16px; }

.g-topbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}

.g-topbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: #73879C;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
}

.g-topbar-link:hover { background: #F2F5F7; color: #2A3F54; }

.g-topbar-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  background: var(--g-accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.2;
}

.g-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #2A3F54;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
}

.g-topbar-user:hover { background: #F2F5F7; color: #2A3F54; }
.g-topbar-user::after { display: none; }

.g-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--g-sidebar);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.g-dropdown-notif {
  min-width: 280px;
  padding: 0;
}

.g-dropdown-notif .dropdown-header {
  background: #F7F7F7;
  color: #2A3F54;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid #E6E9ED;
}

.g-dropdown-notif .dropdown-item {
  padding: 10px 14px;
  border-bottom: 1px solid #F2F5F7;
  white-space: normal;
}

/* ---------------- Conteúdo ---------------- */
.app-content {
  flex: 1;
  margin-left: 230px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  min-height: 60px;
}

.app-sidebar-toggle {
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: none;
}

.app-sidebar-toggle:hover { background: #f3f4f6; }

.app-topbar-empresa { display: flex; align-items: center; }

.app-topbar-empresa-nome {
  font-weight: 600;
  color: #111827;
  font-size: .92rem;
  line-height: 1.1;
}

.app-topbar-empresa-cnpj {
  color: #6b7280;
  font-size: .75rem;
  letter-spacing: .3px;
}

.app-topbar-user {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #374151;
  font-size: .9rem;
}

.app-topbar-user:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.app-topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--pdv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.app-topbar-user-name {
  font-weight: 500;
}

/* ---------------- Main ---------------- */
.app-main {
  flex: 1;
  padding: 22px 28px;
  min-width: 0;
}

.app-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E6E9ED;
}

.app-page-title {
  font-size: 22px;
  font-weight: 400;
  color: #2A3F54;
  margin: 0;
}

.app-page-subtitle {
  color: #73879C;
  font-size: 13px;
  margin: 4px 0 0 0;
}

/* Gentelella x_panel - card padrão do dashboard */
.dash-card {
  background: #fff;
  border: 1px solid var(--g-card-border);
  border-radius: 4px;
  margin-bottom: 16px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.dash-card-header {
  padding: 10px 16px;
  border-bottom: 2px solid var(--g-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #2A3F54;
  margin: 0;
}

.dash-card-toolbox {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-card-toolbox a {
  color: #BDC3C7;
  font-size: 14px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 4px;
  transition: color .15s, background .15s;
}

.dash-card-toolbox a:hover { color: #73879C; background: #F2F5F7; }

.dash-card-body { padding: 18px 16px; }

/* Footer Gentelella */
.g-footer {
  background: #fff;
  border-top: 1px solid var(--g-card-border);
  padding: 14px 28px;
  color: #73879C;
  font-size: 13px;
  text-align: right;
}

/* ---------------- KPI Tile (estilo Gentelella) ---------------- */
.kpi-card {
  background: #fff;
  border: 1px solid var(--g-card-border);
  border-radius: 4px;
  padding: 18px 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: border-color .15s, box-shadow .15s;
}

.kpi-card:hover {
  border-color: #BDC3C7;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.kpi-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  color: #fff;
}

.kpi-card-icon.icon-blue   { background: #3498DB; }
.kpi-card-icon.icon-cyan   { background: #1DC2C2; }
.kpi-card-icon.icon-green  { background: var(--g-accent); }
.kpi-card-icon.icon-orange { background: #F39C12; }
.kpi-card-icon.icon-gray   { background: #B0BEC5; }
.kpi-card-icon.icon-red    { background: #E74C3C; }
.kpi-card-icon.icon-purple { background: #9B59B6; }

.kpi-card-info { flex: 1; min-width: 0; }

.kpi-card-label {
  color: #73879C;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 6px 0;
  font-weight: 600;
  line-height: 1.2;
}

.kpi-card-value {
  font-size: 24px;
  font-weight: 400;
  color: #2A3F54;
  margin: 0 0 6px 0;
  line-height: 1;
}

.kpi-card-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #73879C;
  margin: 0;
}

.kpi-card-trend.trend-up   { color: var(--g-accent); }
.kpi-card-trend.trend-down { color: #E74C3C; }
.kpi-card-trend i { font-size: 10px; }
.kpi-card-trend small { color: #95A5A6; font-size: 11px; }

/* Quick action (estilo Gentelella) */
.quick-action {
  background: #fff;
  border: 1px solid var(--g-card-border);
  border-radius: 4px;
  padding: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #2A3F54;
  transition: border-color .15s, box-shadow .15s;
}

.quick-action:hover {
  border-color: var(--g-accent);
  box-shadow: 0 2px 8px rgba(26,187,156,.15);
  color: #2A3F54;
}

.quick-action i {
  font-size: 20px;
  color: var(--g-accent);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.quick-action-label {
  font-weight: 500;
  font-size: 13px;
  margin: 0;
  line-height: 1.1;
  color: #2A3F54;
}

.quick-action-hint {
  font-size: 11px;
  color: #73879C;
  margin: 0;
}

/* Evita overflow horizontal por conteúdo longo (mas não quebra palavras letra a letra) */
.app-main, .dash-card-body { word-wrap: break-word; overflow-wrap: break-word; }

/* Tabelas nunca quebram palavra letra-a-letra */
.table th, .table td {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}
.table .text-wrap-cell { white-space: normal; }

/* Listagens responsivas: esconde colunas menos importantes em telas pequenas */
@media (max-width: 991.98px) {
  .table .col-hide-md { display: none !important; }
}
@media (max-width: 767.98px) {
  .table .col-hide-sm { display: none !important; }
}

/* ---------------- Responsivo ---------------- */

/* Tablet / Mobile (< 992px): sidebar collapsa */
@media (max-width: 991.98px) {
  .g-sidebar { transform: translateX(-100%); }
  .g-sidebar.show { transform: translateX(0); }
  .app-content { margin-left: 0; }
  .app-main { padding: 18px; }
  .app-page-title { font-size: 20px; }

  /* KPIs reduzem em tablet */
  .kpi-card { padding: 14px; gap: 12px; }
  .kpi-card-icon { width: 56px; height: 56px; font-size: 22px; }
  .kpi-card-value { font-size: 22px; }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .app-main { padding: 14px; }
  .app-page-header { margin-bottom: 14px; padding-bottom: 10px; }
  .app-page-title { font-size: 18px; }
  .app-page-subtitle { font-size: 12px; }

  /* Topbar enxuta */
  .g-topbar { padding: 0 12px; gap: 6px; min-height: 54px; }
  .g-topbar-user span:not(.g-avatar) { display: none; }

  .dash-card-header { padding: 10px 14px; }
  .dash-card-title { font-size: 13.5px; }
  .dash-card-body { padding: 14px; }
  .dash-card-toolbox a { width: 26px; height: 26px; }

  /* Quick actions menores */
  .quick-action { padding: 10px 12px; }
  .quick-action i { font-size: 18px; }
  .quick-action-label { font-size: 13px; }
  .quick-action-hint { font-size: 11px; }
}

/* Mobile pequeno (< 576px) */
@media (max-width: 575.98px) {
  body { font-size: 14px; }
  .app-main { padding: 12px; }
  .app-page-header { margin-bottom: 12px; }

  /* KPI horizontal mais compacto */
  .kpi-card { padding: 12px; gap: 10px; }
  .kpi-card-icon { width: 48px; height: 48px; font-size: 18px; }
  .kpi-card-value { font-size: 20px; margin-bottom: 3px; }
  .kpi-card-label { font-size: 11px; margin-bottom: 4px; }
  .kpi-card-trend { font-size: 11px; }
  .kpi-card-trend small { display: none; } /* esconde "desde semana passada" */

  .g-topbar-link { padding: 6px 8px; }
  .g-avatar { width: 30px; height: 30px; font-size: .9rem; }

  /* Inputs com font-size ≥ 16px evita zoom forçado em iOS */
  .form-control, .form-select { font-size: 16px; }
}

/* Tablet em landscape: sidebar visível mas mais estreita */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .g-sidebar { width: 210px; font-size: 12.5px; }
  .app-content { margin-left: 210px; }
  .g-menu > ul > li > a { padding: 10px 14px; }
  .g-submenu li a { padding: 8px 14px 8px 44px; font-size: 12px; }
}

/* ================================================================
   Responsividade global - aplicada em TODOS os módulos do SYSPDV
   Cobre formulários complexos (MDF-e, CT-e, NF-e) que usam col-md-*
   sem col-12 explícito + tabs com muitas abas + tabelas com colunas fixas.
   ================================================================ */

/* Mobile (<= 767px): força col-md-* virar 100% (stack vertical) */
@media (max-width: 767.98px) {
  .row > [class*="col-md-"]:not([class*="col-sm-"]):not([class*="col-12"]):not([class*="col-11"]):not([class*="col-10"]):not([class*="col-9"]):not([class*="col-8"]):not([class*="col-7"]):not([class*="col-6"]):not([class*="col-5"]):not([class*="col-4"]):not([class*="col-3"]):not([class*="col-2"]):not([class*="col-1 "]):not([class$="col-1"]) {
    flex: 0 0 100%;
    max-width: 100%;
  }
  /* Tabs com muitas abas (CT-e, MDF-e) → wrap em mobile */
  .nav-tabs-cte, .nav-tabs-mdfe, .nav-tabs {
    flex-wrap: wrap !important;
  }
  /* Tabelas: th com width fixo em px → auto em mobile */
  .table-responsive .table th[style*="width"],
  .table-responsive .table td[style*="width"] {
    width: auto !important;
  }
  /* Modais grandes (modal-xl) viram fullscreen em mobile pra usabilidade */
  .modal-xl .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
  }
  .modal-xl .modal-content {
    height: 100%;
    border-radius: 0;
  }
  /* Botões de ação em forms: garante wrap (paginação, ações de listagem) */
  .d-flex.gap-2:not(.flex-nowrap) {
    flex-wrap: wrap;
  }
  /* Dropdown sugestões (autocomplete) caber na tela */
  .list-group.position-absolute {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  /* Inputs de chave de acesso (44 dígitos) quebram word em mobile */
  .font-monospace[maxlength="44"], td.font-monospace {
    word-break: break-all;
  }
}

/* Tablet pequeno (576-767px): inputs de filtro mais compactos */
@media (min-width: 576px) and (max-width: 767.98px) {
  .form-control-sm, .form-select-sm, .btn-sm {
    font-size: 13px;
  }
}
