/* ==========================================================================
   ReportMovil - Theme
   Paleta basada en el logo: gris pizarra oscuro + verde esmeralda.
   ========================================================================== */

:root {
  --rm-dark: #3c4643;
  --rm-dark-2: #4a5652;
  --rm-dark-3: #556260;
  --rm-green: #00c896;
  --rm-green-dark: #00a67d;
  --rm-green-light: #4fe0b8;
  --rm-bg: #eef1f1;
  --rm-text: #2c3331;
  --rm-muted: #6b7674;
  --rm-radius: 0.85rem;
  --rm-shadow: 0 0.5rem 1.5rem rgba(30, 40, 38, 0.1);
  --rm-shadow-lg: 0 1.5rem 3rem rgba(20, 28, 26, 0.18);
}

body {
  background-color: var(--rm-bg);
  color: var(--rm-text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--rm-green-dark);
}

a:hover {
  color: var(--rm-dark);
}

/* ---------------------------------------------------------------------- */
/* Navbar                                                                  */
/* ---------------------------------------------------------------------- */

.navbar {
  background: linear-gradient(100deg, var(--rm-dark) 0%, var(--rm-dark-2) 55%, var(--rm-dark-3) 100%) !important;
  box-shadow: 0 0.2rem 0.75rem rgba(0, 0, 0, 0.18);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: none !important;
}

.navbar .navbar-brand {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.navbar .navbar-brand::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  background: url("/images/icono.png") center / contain no-repeat;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.15));
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar .nav-link.active {
  color: #fff !important;
  background-color: rgba(0, 200, 150, 0.18);
}

.navbar .dropdown-menu {
  border: none;
  border-radius: 0.6rem;
  box-shadow: var(--rm-shadow-lg);
  padding: 0.4rem;
  margin-top: 0.5rem;
}

.navbar .dropdown-item {
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  color: var(--rm-text);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: rgba(0, 200, 150, 0.12);
  color: var(--rm-dark);
}

.navbar .dropdown-divider {
  margin: 0.35rem 0;
}

/* ---------------------------------------------------------------------- */
/* Botones                                                                 */
/* ---------------------------------------------------------------------- */

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--rm-green) 0%, var(--rm-green-dark) 100%);
  border-color: var(--rm-green-dark);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--rm-green-dark) 0%, var(--rm-green-dark) 100%);
  border-color: var(--rm-green-dark);
  filter: brightness(1.03);
  box-shadow: 0 0.4rem 1rem rgba(0, 166, 125, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-outline-primary {
  color: var(--rm-green-dark);
  border-color: var(--rm-green-dark);
}

.btn-outline-primary:hover {
  background-color: var(--rm-green-dark);
  border-color: var(--rm-green-dark);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(0, 200, 150, 0.45);
}

.form-check-input:checked {
  background-color: var(--rm-green-dark);
  border-color: var(--rm-green-dark);
}

/* ---------------------------------------------------------------------- */
/* Tarjetas / formularios                                                  */
/* ---------------------------------------------------------------------- */

.card {
  border: none;
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow);
}

.card-header {
  border-top-left-radius: var(--rm-radius) !important;
  border-top-right-radius: var(--rm-radius) !important;
  border-bottom: none;
}

.form-control,
.form-select {
  border-radius: 0.6rem;
  border-color: #d7dcdb;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rm-green);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--rm-green-dark);
}

/* ---------------------------------------------------------------------- */
/* Login / páginas de autenticación                                       */
/* ---------------------------------------------------------------------- */

body.auth-body {
  margin-bottom: 0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: #fff;
  position: relative;
}

/* Panel izquierdo: foto real + contexto de negocio */
.auth-visual {
  flex: 0 0 46%;
  max-width: 34rem;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.75rem 3rem;
  color: #fff;
  overflow: hidden;
  background-image: url("/images/login-camion.jpg");
  background-size: cover;
  background-position: center;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, rgba(20, 28, 26, 0.94) 0%, rgba(28, 38, 36, 0.86) 30%, rgba(15, 60, 48, 0.55) 65%, rgba(0, 90, 68, 0.4) 100%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -2px;
  width: 4px;
  background: linear-gradient(180deg, var(--rm-green-light), var(--rm-green-dark));
}

.auth-visual__brand {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-visual__logo {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.auth-visual__brand-name {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.auth-visual__brand-name .text-accent {
  color: var(--rm-green-light);
}

.auth-visual__content {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.auth-visual__eyebrow {
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--rm-green-light);
  margin-bottom: 0.8rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.auth-visual__content h1 {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.24;
  margin-bottom: 1.15rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.auth-visual__content h1 .text-accent {
  color: var(--rm-green-light);
  display: block;
}

.auth-visual__lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.auth-visual__lead strong {
  color: #fff;
}

.auth-visual__features {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-visual__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.auth-visual__feature-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 200, 150, 0.16);
  border: 1px solid rgba(0, 200, 150, 0.4);
  color: var(--rm-green-light);
  font-size: 1rem;
}

.auth-visual__feature-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.2rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.auth-visual__feature-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.auth-visual__tagline {
  position: relative;
  font-family: "Caveat", cursive;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--rm-green-light);
  transform: rotate(-1.5deg);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Panel derecho: formulario */
.auth-form-side {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
}

.auth-form-badge {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--rm-muted);
  text-align: right;
}

.auth-form-badge i {
  color: var(--rm-green-dark);
  font-size: 1.15rem;
}

.auth-form-badge__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rm-text);
}

.auth-form-badge__subtitle {
  display: block;
  font-size: 0.72rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 24rem;
}

.auth-form-wrap__logo {
  width: 2.75rem;
  height: 2.75rem;
  display: none;
  margin-bottom: 1.25rem;
}

.auth-form-wrap h1 {
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--rm-text);
  margin-bottom: 0.7rem;
}

.auth-form-wrap__accent {
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--rm-green), var(--rm-green-dark));
  margin-bottom: 1.1rem;
}

.auth-form-wrap__subtitle {
  color: var(--rm-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.85rem;
}

.auth-input {
  position: relative;
  margin-bottom: 1.1rem;
}

.auth-input i.auth-input__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rm-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.auth-input .form-control {
  padding-left: 2.6rem;
  height: 3.1rem;
}

.auth-input__toggle {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--rm-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.auth-input__toggle:hover {
  color: var(--rm-dark);
}

.auth-form-wrap .checkbox label {
  color: var(--rm-muted);
  font-size: 0.92rem;
}

.auth-form-wrap .btn-primary {
  padding: 0.7rem 1rem;
  font-size: 1.02rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-form-help {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eceeee;
}

.auth-form-help__prompt {
  font-size: 0.82rem;
  color: var(--rm-muted);
  margin-bottom: 0.2rem;
}

.auth-form-help__link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--rm-green-dark);
}

.auth-form-footer {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--rm-muted);
}

@media (max-width: 860px) {
  .auth-visual {
    display: none;
  }

  .auth-form-wrap__logo {
    display: block;
  }

  .auth-form-side {
    padding: 3rem 1.5rem;
  }

  .auth-form-side {
    flex-direction: column;
  }

  .auth-form-badge {
    position: static;
    justify-content: center;
    margin-bottom: 1.5rem;
  }
}

/* ---------------------------------------------------------------------- */
/* Tablas                                                                  */
/* ---------------------------------------------------------------------- */

.table thead th {
  background-color: var(--rm-dark);
  color: #fff;
  border: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 200, 150, 0.07);
}

/* jQuery Bootgrid tables (Aprobar, Mantenedores) load their own BTGridStyle.css
   with an amber header; force it to match the dark theme, including the
   nested .column-header-anchor text which BTGridStyle colors separately. */
.bootgrid-table thead,
.bootgrid-table th,
.bootgrid-table th:active,
.bootgrid-table th:hover {
  background-color: var(--rm-dark) !important;
}

.bootgrid-table th,
.bootgrid-table th > .column-header-anchor,
.bootgrid-table th > .column-header-anchor > .text {
  color: #fff !important;
}
