/* ===========================================================
   Fastxpress — tema do painel moderno (Bootstrap 5)
   Mantém a identidade azul do painel legado, com visual atual.
   =========================================================== */

:root {
  --fx-primary: #0088cc;
  --fx-primary-dark: #0072ab;
  --fx-primary-light: #00aaff;
  --fx-primary-rgb: 0, 136, 204;
}

/* Sticky footer */
html, body { height: 100%; }
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

/* ---- Navbar ---- */
.fx-navbar {
  background-image: linear-gradient(to bottom, var(--fx-primary-light), var(--fx-primary));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.fx-navbar .navbar-brand img { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.fx-navbar .nav-link { font-weight: 500; }
.fx-navbar .nav-link.active,
.fx-navbar .nav-link:hover { color: #fff !important; }

/* ---- Footer ---- */
.fx-footer {
  background: #fff;
  flex-shrink: 0;
}

/* ---- Cabeçalho de página ---- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.page-head h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

/* ---- Cards ---- */
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-header { background: #fff; font-weight: 600; }

/* ---- Tabelas ---- */
.table > :not(caption) > * > * { vertical-align: middle; }
tr.inativo td { color: var(--bs-secondary-color); }
tr.inativo td:first-child { position: relative; }

/* Listas: manter cada célula em UMA linha (sem quebrar em 2). */
[data-fx-list] th,
[data-fx-list] td { white-space: nowrap; }
/* Células de texto: truncar com reticências (exceto as que têm form/botões). */
[data-fx-list] td:not(:has(input)):not(:has(select)):not(:has(.btn)):not(:has(.badge)) {
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Botões primários no tom da marca ---- */
.btn-primary {
  --bs-btn-bg: var(--fx-primary);
  --bs-btn-border-color: var(--fx-primary);
  --bs-btn-hover-bg: var(--fx-primary-dark);
  --bs-btn-hover-border-color: var(--fx-primary-dark);
  --bs-btn-active-bg: var(--fx-primary-dark);
  --bs-btn-active-border-color: var(--fx-primary-dark);
}
.text-primary { color: var(--fx-primary) !important; }
a { color: var(--fx-primary); }

/* ===========================================================
   Dashboard (tiles)
   =========================================================== */
.fx-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.fx-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 1.25rem;
  border-radius: .75rem;
  color: #fff;
  text-decoration: none;
  background-image: linear-gradient(135deg, var(--fx-primary-light), var(--fx-primary));
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.fx-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  color: #fff;
}
.fx-tile .fx-tile-value { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.fx-tile .fx-tile-label { font-size: .95rem; opacity: .95; }
.fx-tile .bi { font-size: 1.5rem; opacity: .9; }
.fx-tile.fx-tile-alt {
  background-image: linear-gradient(135deg, #34c38f, #16a085);
}
.fx-tile.fx-tile-muted {
  background-image: linear-gradient(135deg, #7f8c9a, #5d6d7e);
}

/* ===========================================================
   Login
   =========================================================== */
.fx-login-wrap {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background-image: linear-gradient(135deg, var(--fx-primary-light), var(--fx-primary-dark));
}
.fx-login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.fx-login-card .card-body { padding: 2rem; }
.fx-login-logo { max-width: 180px; margin: 0 auto 1rem; display: block; }
