/**
 * Ponte visual — harmoniza markup legado dentro do shell EZ-Mobi.
 */
.ez-app-shell .ez-legacy-content,
.ez-auth-shell {
  font-family: var(--font-family) !important;
}

/* Overlay escuro de login legado */
.ez-body #login {
  position: static !important;
  width: auto !important;
  left: auto !important;
  top: auto !important;
  background: transparent !important;
  z-index: auto !important;
}

.ez-body #login > div[style*="height: 130px"],
.ez-body #login > div[style*="height:130px"] {
  display: none !important;
}

.ez-auth-shell #phantomblock,
.ez-body #phantomblock {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
}

/* Hub portal usuário */
.ez-app-shell .main .content {
  background: transparent !important;
  height: auto !important;
}

.ez-app-shell .main .logout {
  display: none !important;
}

.ez-hub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 8px 0 24px;
  max-width: 720px;
  margin: 0 auto;
}

.ez-hub-tile {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  width: 120px;
  height: 120px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.ez-hub-tile:hover {
  background: rgba(230, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(0, 25, 48, 0.12);
}

.ez-hub-tile.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.ez-hub-tile .material-symbols-outlined {
  font-size: 48px;
  color: var(--color-primary);
}

.ez-hub-tile p {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: var(--color-text);
}

/* Tiles legado → hub */
.ez-legacy-content .box-select {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  width: 120px !important;
  height: 120px !important;
}

.ez-legacy-content .box-select .icon,
.ez-legacy-content .box-select .material-symbols-outlined {
  color: var(--color-primary) !important;
}

.ez-legacy-content .box-select p {
  color: var(--color-text) !important;
}

/* Navbar legado duplicada */
.ez-app-shell .ez-legacy-nav-hide,
.ez-app-shell nav.navbar.legacy-inline-nav {
  display: none !important;
}

/* Caixas brancas semitransparentes legado */
.ez-legacy-content #box,
.ez-legacy-content .containers > div[style*="background-color:rgba(255,255,255"] {
  background: var(--auth-card-bg) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
}

/* Inputs legado */
.ez-legacy-content input[type="text"]:not(.ez-field),
.ez-legacy-content input[type="password"]:not(.ez-field),
.ez-legacy-content input[type="email"]:not(.ez-field),
.ez-legacy-content input[type="tel"]:not(.ez-field),
.ez-legacy-content input[type="number"]:not(.ez-field),
.ez-legacy-content select:not(.ez-field),
.ez-legacy-content textarea:not(.ez-field) {
  width: 100%;
  max-width: 100%;
  height: var(--height-input);
  padding: 0 12px;
  border: 1px solid var(--color-input-on-card-border);
  border-radius: var(--radius-input);
  background: var(--color-input-on-card);
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
  box-sizing: border-box;
}

.ez-legacy-content textarea:not(.ez-field) {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
}

/* Botões legado */
.ez-legacy-content input[type="submit"].btn-primary,
.ez-legacy-content input.btn-primary,
.ez-legacy-content button.btn-primary:not(.ez-btn-primary),
.ez-legacy-content .btn-primary[style*="background"],
.ez-legacy-content input[type="submit"][style*="#001930"],
.ez-legacy-content input[type="submit"][style*="#001930"],
.ez-legacy-content input[type="button"][style*="background-color:#"],
.ez-legacy-content a.btn[style*="background"] {
  background-color: var(--color-primary-button) !important;
  border-color: var(--color-primary-button) !important;
  color: #fff !important;
  border-radius: var(--radius-button) !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  min-height: var(--height-button);
  box-shadow: none !important;
}

.ez-legacy-content .btn[style*="border-radius: 100px"],
.ez-legacy-content input[style*="border-radius: 100px"],
.ez-legacy-content button[style*="border-radius:100px"] {
  border-radius: var(--radius-button) !important;
}

.ez-legacy-content .btn-info,
.ez-legacy-content .btn[style*="#13274F"],
.ez-legacy-content .btn[style*="#13274F"] {
  background-color: var(--color-primary-button) !important;
  border-color: var(--color-primary-button) !important;
}

/* Títulos legado */
.ez-legacy-content h1,
.ez-legacy-content h2,
.ez-legacy-content h3,
.ez-legacy-content h4,
.ez-legacy-content h5[style*="color:#"],
.ez-legacy-content h5[style*="color: #"],
.ez-legacy-content font[style*="color:#"],
.ez-legacy-content font[style*="color: #"] {
  color: var(--color-primary) !important;
}

/* Loaders legado */
.ez-legacy-content .loader,
.ez-body .loader {
  border-color: var(--color-border) !important;
  border-top-color: var(--color-primary-button) !important;
}

/* DataTables dentro do painel */
.ez-legacy-content .dataTables_wrapper,
.ez-legacy-content table.dataTable {
  font-family: inherit;
}

.ez-legacy-content table.dataTable thead th {
  background: var(--color-primary) !important;
  color: #fff !important;
}

/* Modais Bootstrap legado */
.ez-legacy-content .modal-content {
  border-radius: var(--auth-card-radius);
  border: 1px solid var(--color-border);
}

.ez-legacy-content .modal-header {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--auth-card-radius) var(--auth-card-radius) 0 0;
}

.ez-legacy-content .modal-header .close {
  color: #fff;
  opacity: 0.9;
}

/* Cards bootstrap legado */
.ez-legacy-content .card {
  border-radius: var(--radius-card);
  border-color: var(--color-border);
}

/* Pills / badges cyan */
.ez-legacy-content [style*="rgba(0,151,212"],
.ez-legacy-content [style*="rgba(0, 151, 212"] {
  box-shadow: var(--shadow-card) !important;
}

/* Logo larga legada */
.ez-legacy-content img[src*="ezmobi.png"],
.ez-auth-shell img[src*="ezmobi.png"] {
  display: none !important;
}

.ez-legacy-content img[src*="ezmobi.png"] + br,
.ez-auth-shell img[src*="ezmobi.png"] + br {
  display: none;
}

/* Admin pages sem shell — forçar fundo */
body.ez-body:not(.ez-in-shell) {
  background-image: var(--ez-bg-shell);
  background-size: cover;
  background-position: center;
  font-family: var(--font-family);
}

body.ez-body:not(.ez-in-shell) #box {
  background: var(--auth-card-bg) !important;
  border-radius: var(--radius-card) !important;
  padding: 16px;
  max-width: 960px;
  margin: 0 auto;
}

/* Speech bubble nav legado (navbar.php) — esconder quando fora do painel legado isolado */
.ez-app-shell .speech-bubble,
.ez-app-shell .speechbubble,
.ez-app-shell #speechbubble {
  display: none !important;
}
