/* ===== Estilos básicos de la página ===== */
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  overflow-x: hidden; /* Evita scroll horizontal */
  overflow-y: auto;   /* Scroll vertical si es necesario */
  background: #f1f2f7;
  height: 100%;
  width: 100%;
}

a {
  color: #777;          /* Color de los enlaces */
  text-decoration: none; /* Sin subrayado */
}

/* ===== Utilidades ===== */
.padding-top {
  padding-top: 60px;
}

/* ===== Página de login ===== */
.login-page {
  width: 350px;
  margin: 7% auto;
  padding: 0 20px;
  background-color: #f9f9f9;
  border: 1px solid #f2f2f2;
}

.login-page .text-center {
  margin-bottom: 10px;
}

/* ===== Caja general ===== */
.box {
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #f2f2f2;
}

/* ===== Página principal ===== */
.page {
  position: relative;
  display: block;
  top: 50px;
  left: 0;
  padding: 35px 15px 20px 270px; /* Espacio para el sidebar */
}
/* Cuando no hay sidebar (ej: conductores) */
/* Cuando no hay sidebar (p.ej. conductores) */
.page.no-sidebar {
  padding: 35px 15px 20px 15px !important; /* elimina el hueco de 270px */
}


/* ===== Colores de fondo personalizados ===== */
.bg-green { background-color: #A3C86D; }
.bg-blue { background-color: #7ACBEE; }
.bg-yellow { background-color: #FDD761; }
.bg-red { background-color: #FF7857; }

/* ===== Paneles ===== */
.panel-default > .panel-heading {
  background-color: #f5f5f5;
  border-bottom: 2px solid #3498DB;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 15px;
}

.panel-box {
  width: 100%;
  text-align: center;
  border: none;
}

.panel-value {
  width: 60%;
  border-radius: 0 3px 3px 0;
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
}

.panel-value h2 {
  margin-top: 30px;
}

.panel-icon {
  padding: 30px;
  width: 40%;
  border-radius: 3px 0 0 3px;
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
}

.panel-icon i {
  line-height: 65px;
  font-size: 40px;
  color: #fff;
}

/* ===== Header fijo ===== */
#header {
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  background-color: #fff;
  width: 100%;
  height: 65px;
  line-height: 65px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  padding: 0 15px;
  box-sizing: border-box;
  overflow: hidden; /* Evita que contenido sobresalga */
}

/* ===== Logo ===== */
.logo {
  font-weight: bold;
  font-size: 1.5em;
  padding: 5px 0;
  max-height: 65px; /* Nunca más alto que el header */
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 55px; /* Margen para padding y line-height */
  width: auto;
  display: block;
  object-fit: contain; /* Sin distorsión */
  max-width: 100%; /* No excede el contenedor */
}

/* ===== Fecha en header ===== */
.header-date {
  color: #9b9b9b;
  margin-left: 20px;
}

/* ===== Menú de información en header ===== */
.info-menu {
  height: 60px;
  margin: 0;
  line-height: 60px;
  padding: 0 15px;
}

.info-menu li.profile {
  position: relative;
}

.profile a.toggle {
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  color: rgba(150, 150, 158, 1.0);
  position: relative;
  padding: 10px 10px 10px 0;
  margin: 0;
  background: #f9f9f9;
  border-radius: 30px;
}

.info-menu li.profile a img {
  width: 30px;
  height: 30px;
}

/* ===== Menú desplegable ===== */
.dropdown-menu {
  margin-top: 4px;
  border-color: #fefefe;
  border-radius: 0;
  box-shadow: 0px 0px 5px rgba(86, 96, 117, 0.15);
  -moz-box-shadow: 0px 0px 5px rgba(86, 96, 117, 0.15);
  -webkit-box-shadow: 0px 0px 5px rgba(86, 96, 117, 0.15);
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
  display: block;
  line-height: 35px;
}

.dropdown-menu li a {
  text-decoration: none;
  display: block;
  font-size: 14px;
  position: relative;
  line-height: 30px;
  width: 100%;
  border-bottom: 1px solid #f4faf9;
}

.dropdown-menu li a i {
  margin-right: 5px;
}

.dropdown-menu li.last a {
  border-bottom: 0;
}

/* ===== Datepicker ===== */
.datepicker {
  text-align: center;
}

/* ===== Sidebar lateral fijo ===== */
.sidebar {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  padding: 65px 0 0; /* Espacio para el header */
  height: 100%;
  width: 250px;
  background: #2a3542;
  border-right: 1px solid #ddd;
  text-align: center;
}

/* Efectos hover para sidebar y submenús */
.sidebar ul li:hover,
.submenu ul li:hover {
  -webkit-transition: all .2s ease-in-out;
  transition: all .2s ease-in-out;
}

/* Lista de navegación del sidebar */
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar ul li {
  display: block;
}

.sidebar ul li:hover,
ul.submenu {
  background-color: #35404d;
}

.sidebar ul li a:hover {
  color: white;
}

.sidebar ul li a,
ul.submenu li a {
  color: #aeb2b7;
  display: block;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  text-align: left;
}

.sidebar ul li a span,
.sidebar ul li i {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-shadow: 0 1px rgba(0, 0, 0, 1);
}

.sidebar ul li a i {
  color: #aeb2b7;
  padding: 15px 22px;
  text-align: center;
}

/* Submenús ocultos por defecto */
ul.submenu {
  display: none;
  position: relative;
}

ul.submenu li a:hover {
  background-color: #35404d;
}

ul.submenu li a {
  padding-left: 45px;
}

/* Líneas punteadas para submenús */
ul.submenu li:before {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  left: 25px;
  top: 0;
  bottom: 0;
  border: 1px dotted #d7d7d7;
  border-width: 0 0 0 1px;
}

ul.submenu li a:before {
  content: "";
  display: inline-block;
  position: absolute;
  width: 7px;
  left: 25px;
  top: 18px;
  border-top: 1px dotted #d7d7d7;
}

/* ===== Reportes ===== */
.sale_report_header {
  padding: 15px 0;
}

/* Estilos para tablas */
table td h6 {
  margin: 0 0 0.2em 0;
}

table tfoot tr td:first-child {
  border: 0;
}

table tfoot tr td:last-child {
  border-top: 1px solid #ccc;
}

table td h6,
table tfoot tr td:last-child {
  color: #000;
  _font-size: 1.2em;
  font-weight: normal;
}

/* ===== Formularios ===== */
.form-control {
  color: #646464;
  border: 1px solid #e6e6e6;
  border-radius: 3px;
  box-shadow: none;
  -moz-transition: all .15s ease-out;
  -webkit-transition: all .15s ease-out;
  transition: all .15s ease-out;
}

.form-control:focus {
  background: #f8f8f8;
  border-color: #3498DB;
  outline: 0;
  box-shadow: none;
}

/* ===== Botones ===== */
.btn {
  border-radius: 3px;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  transition: all 300ms ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: #51aded;
  border-color: #3d8fd8;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active {
  color: #fff;
  background-color: #3175b8;
  border-color: #3d8fd8;
}

.btn-success {
  background-color: #2ecc71;
}

.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:active,
.btn-success.active {
  background-color: #27ae60;
}

.btn-warning {
  background-color: #e7c13e;
  border-color: #dfba3c;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning.focus,
.btn-warning:active,
.btn-warning.active {
  background-color: #d0ac2c;
  border-color: #dfba3c;
}

.btn-danger {
  background-color: #ed5153;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger.focus,
.btn-danger:active,
.btn-danger.active {
  background-color: #bb282a;
}

/* ===== Otros elementos ===== */
.input-group-addon {
  background-color: #fcfcfc;
  border: 1px solid #dbdbdb;
  border-radius: 0;
}

input[type=file] {
  text-indent: -99999px;
}

td img.img-thumbnail {
  width: 125px;
  height: 125px;
  vertical-align: top;
}

.img-avatar {
  width: 50px;
  height: 50px;
}

.jumbotron {
  margin-bottom: 0;
}

.list-group-item:first-child,
.list-group-item:last-child {
  border-radius: 0;
}

.profile .jumbotron {
  border-radius: 3px 3px 0 0;
}

.profile .jumbotron h3 {
  color: white;
}

img.img-size-2 {
  width: 125px;
  height: 125px;
}


.page.no-sidebar {
  padding: 35px 15px 20px 15px !important;
}






/* ===== Media queries para dispositivos pequeños ===== */
@media (max-width: 1767px) {
  .page {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .sidebar {
    display: none !important;
  }
}


.dropdown-menu {
  z-index: 1050 !important;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Base: sin sidebar */
.page { padding: 35px 15px 20px 15px; }

/* Solo cuando SÍ hay sidebar (admin, rol3) */
.has-sidebar .page { padding-left: 270px; }

/* Móviles: mantén tus márgenes reducidos */
@media (max-width: 767px) {
  .page { padding-left: 15px !important; padding-right: 15px !important; }
}

