/* Reset */
body, h1, p, ul, li, a {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  color: #333;
}

/* General layout */
.crm-container {
  display: grid;
  grid-template-areas:
      "header header"
      "sidebar content";
  grid-template-columns: 250px 1fr;
  grid-template-rows: 100px auto;
  height: 100vh;
}
.crm-header {
  grid-area: header;
  background-color: hsla(240, 20%, 15%, 0.289);
  display: flex;
  align-items: flex-end; /* Align items to the bottom */
  justify-content: space-between; /* Space between logo and right-aligned items */
  padding: 0 20px;
  color: #fff;
  position: relative; /* Ensure the header is a positioning context */
}


/* Container for the logout button and date/time */
.header-right {
  display: flex;
  align-items: flex-end; /* Align items to the bottom */
  gap: 20px; /* Space between logout button and date/time */
}

.logo-container img {
  height: 99px;
  padding: 0 20px;
}

/* Add this to your styles.css file */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between date/time and username */
}

#fecha-hora {
  font-size: 1em; /* Adjust the font size for date/time */
  color: #555; /* Slightly lighter color */
  margin: 0; /* Remove default margin */
}
/* Mejorar contraste en textos */
#username {
  font-size: 1em;
  color: #222; /* Color más oscuro para mejor visibilidad */
  font-weight: bold;
}
/* Add this to your styles.css file */
.welcome-cont {
  text-align: center; /* Center the text */
  margin-top: 20px; /* Add some space above the welcome message */
}

#wel {
  font-size: 1.8em; /* Increase the font size */
  color: #333; /* Darker color for better readability */
  font-weight: bold; /* Make it bold */
  margin: 0; /* Remove default margin */
}

#logout-btn {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  padding: 5px 10px; /* Adjust padding for better appearance */
  background-color: #4c4c68; /* Add background color */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 10px; /* Add some space at the bottom */
}
#logout-btn:hover {
  background-color: #33334d; /* Darker background on hover */
}

.crm-sidebar {
  grid-area: sidebar;
  background-color: #27293d;
  color: #fff;
  padding: 20px;
}
.menu-link {
  color: #ccc; /* Color de texto */
  font-size: 16px;
  display: block;
  padding: 10px;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}

.menu-link:hover {
  background-color: #4c4c68; /* Color al pasar el mouse */
  color: #fff; /* Color del texto al pasar el mouse */
}

.menu-item {
  margin-bottom: 15px; /* Espaciado entre elementos */
}

.menu-item a {
  color: #ccc; /* Color de texto por defecto */
  font-size: 16px;
  display: block;
  padding: 10px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.menu-item a:hover {
  background-color: #4c4c68; /* Fondo al pasar el mouse */
  color: #fff; /* Texto al pasar el mouse */
}

.submenu {
  display: none; /* Submenús ocultos por defecto */
  margin-left: 20px;
  margin-top: 10px;
}

.submenu li a {
  color: #bbb; /* Color del texto en submenús */
  font-size: 14px;
  display: block;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}

.submenu li a:hover {
  background-color: #4c4c68; /* Fondo al pasar el mouse */
  color: #fff; /* Texto al pasar el mouse */
}

.menu-options {
  margin-top: 20px;
}
.menu-item.active .submenu {
  display: block;
}
/* Estilo para resaltar el menú activo */
.menu-item.active > .menu-link {
  background-color: #4c4c68;
  color: white;
  font-weight: bold;
}


.menu-options li {
  margin-bottom: 15px;
}

.menu-options a {
  color: #ccc;
  font-size: 16px;
  display: block;
  padding: 10px;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}

.menu-options a:hover {
  background-color: #4c4c68;
  color: #fff;
}

.crm-content {
  grid-area: content;
  padding: 20px;
  background-color: #fff;
  border-left: 1px solid #ddd;
}
.crm-content_ {
  grid-area: content;
  padding: 20px;
  background-color: #fff;
  border-left: 1px solid #ddd;
}

.crm-content h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

/* Form Styles */
#data-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 20px; /* Space between the two form groups in a row */
  margin-bottom: 15px;
}

.form-group {
  flex: 1; /* Each form group takes equal space */
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.form-group input[type="text"] {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus {
  border-color: #4c4c68;
  outline: none;
  box-shadow: 0 0 5px rgba(76, 76, 104, 0.5);
}

#data-form button[type="submit"],
#data-form button[type="button"] {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #4c4c68;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 20px; /* Space above the submit button */
  width: 100%; /* Full width */
}

#data-form button[type="submit"],
#data-form button[type="button"]:hover {
  background-color: #33334d;
}
h1 {
  font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif;
  font-size: 30px;
  padding: 30px 30px;
  text-align: center;
  text-rendering: optimizeLegibility;
}

h2 {
  font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif;
  font-size: 24px;
  padding: 30px 30px;
  text-align: center;
  text-rendering: optimizeLegibility;
}

.content_wel {
  width:237px;
  font-size:36px;
  line-height:40px;
  font-family:'Muli';
  color:#ecf0f1;
  height:40px;
  position:absolute;
  top:50%;
  left:50%;
  margin-top:-15px;
  margin-left:-118px;
  
  &:before {
    content:'[';
    position:absolute;
    left:-30px;
    line-height:40px;
  }
  &:after {
    content:']';
    position:absolute;
    right:-30px;
    line-height:40px;
  }
  &:after, &:before {
    color:#16a085;
    font-size:42px;
    animation:2s linear 0s normal none infinite opacity;
    -webkit-animation:2s ease-out 0s normal none infinite opacity;
    -moz-animation:2s ease-out 0s normal none infinite opacity;
    -o-animation:2s ease-out 0s normal none infinite opacity;
  }
}


/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow for depth */
  border-radius: 8px; /* Rounded corners */
  overflow: hidden; /* Ensures rounded corners are visible */
}

table thead tr {
  background-color: #4c4c68; /* Dark header background */
  color: #fff; /* White text for header */
  text-align: left;
}

table th,
table td {
  padding: 12px 15px; /* Add padding for spacing */
}

table tbody tr {
  border-bottom: 1px solid #ddd; /* Light border between rows */
}

table tbody tr:nth-of-type(even) {
  background-color: #f9f9f9; /* Alternate row color */
}

table tbody tr:last-of-type {
  border-bottom: 2px solid #4c4c68; /* Thicker border for the last row */
}

table tbody tr:hover {
  background-color: #f1f1f1; /* Hover effect for rows */
  cursor: pointer; /* Change cursor on hover */
}

/* Add a subtle animation for hover */
table tbody tr {
  transition: background-color 0.3s ease;
}

/* Style for the "No results" message */
.no-results {
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #666;
}

/* Add animation to the table */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

table {
  animation: fadeIn 0.5s ease-in-out;
}

/* Update the grid layout for smaller screens */
@media (max-width: 768px) {
  .crm-container {
    grid-template-areas:
      "header"
      "sidebar"
      "content";
    grid-template-columns: 1fr; /* Single column for smaller screens */
    grid-template-rows: auto auto auto; /* Adjust rows for header, sidebar, and content */
  }

  .crm-sidebar {
    padding: 10px; /* Reduce padding for smaller screens */
  }

  .crm-content {
    padding: 10px; /* Reduce padding for smaller screens */
  }
}
@media (max-width: 768px) {
  .crm-header {
    flex-direction: column; /* Stack elements vertically */
    align-items: flex-start; /* Align items to the left */
    padding: 10px; /* Reduce padding */
  }

  .logo-container img {
    height: 60px; /* Reduce logo size for smaller screens */
    padding: 0; /* Remove padding */
  }

  #fecha-hora, #wel, #logout-btn {
    padding: 5px 0; /* Adjust padding for smaller screens */
  }
}
@media (max-width: 768px) {
  .crm-sidebar {
    padding: 10px; /* Reduce padding */
  }

  .menu-link {
    font-size: 14px; /* Reduce font size for smaller screens */
  }

  .submenu {
    margin-left: 10px; /* Reduce margin for smaller screens */
  }

  .menu-item.has-submenu {
    position: relative;
  }

  .menu-item.has-submenu .submenu {
    display: none; /* Hide submenus by default on smaller screens */
  }

  .menu-item.has-submenu.active .submenu {
    display: block; /* Show submenu when active */
  }
}


/* Login Container */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f4f4f9;
}

/* Login Form */
#login-form {
  background-color: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

#login-form h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

/* Form Group */
#login-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

#login-form .form-group input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#login-form .form-group input:focus {
  border-color: #4c4c68;
  outline: none;
  box-shadow: 0 0 5px rgba(76, 76, 104, 0.5);
}

/* Error Message */
.error-message {
  color: #ff4d4d;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Submit Button */
#login-form button {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #4c4c68;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#login-form button:hover {
  background-color: #33334d;
}

/* Logo Container */
.login-container .logo-container img {
  max-width: 100%;
  height: auto;
  width: 150px;
  margin-bottom: 20px;
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
  .login-container {
      padding: 20px;
  }

  #login-form {
      padding: 20px;
  }

  .login-container .logo-container img {
      width: 120px;
  }
}

/* Register Container */
.register-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f4f4f9;
}

/* Register Form */
#register-form {
  background-color: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

#register-form h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

/* Form Group */
#register-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

#register-form .form-group input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#register-form .form-group input:focus {
  border-color: #4c4c68;
  outline: none;
  box-shadow: 0 0 5px rgba(76, 76, 104, 0.5);
}
/* Mejorar los inputs */
input[type="text"], input[type="date"], select {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus, input[type="date"]:focus, select:focus {
  border-color: #4c4c68;
  outline: none;
  box-shadow: 0 0 5px rgba(76, 76, 104, 0.5);
/* Flash Messages */
.error {
  color: #ff4d4d;
  font-size: 14px;
  margin-bottom: 20px;
}

.success {
  color: #16a085;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Submit Button */
#register-form button {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #4c4c68;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#register-form button:hover {
  background-color: #33334d;
}

/* Logo Container */
.register-container .logo-container img {
  max-width: 100%;
  height: auto;
  width: 150px;
  margin-bottom: 20px;
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
  .register-container {
      padding: 20px;
  }

  #register-form {
      padding: 20px;
  }

  .register-container .logo-container img {
      width: 120px;
  }
}

.error-container {
  color: red;
  font-weight: bold;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #ffe5e5;
  border: 1px solid red;
  border-radius: 5px;
}
}
/* Estilos del botón "Guardar Factura" */
.btn-save {
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background-color: #4c4c68; /* Color original del sistema */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
  text-align: center;
  display: block;
  margin: 20px auto; /* Centrar botón */
  width: auto; /* Ajustar ancho */
}

/* Cambia de color al pasar el mouse */
.btn-save:hover {
  background-color: #33334d; /* Color más oscuro al pasar el mouse */
}
.btn-cancel {
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  color: white !important;
  background-color: #d9534f !important; /* Rojo */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
  text-align: center;
  display: block;
  margin: 20px auto; /* Centrar botón */
  width: auto;
}

.btn-cancel:hover {
  background-color: #c9302c !important; /* Rojo más oscuro */
}
.dashboard-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.dashboard-card h2 {
  margin-bottom: 10px;
  font-size: 1.4em;
  color: #4c4c68;
}

.dashboard-card p {
  font-size: 1.6em;
  font-weight: bold;
}

.chart-container {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#facturaChartGeneral {
  max-width: 200px;
  max-height: 200px;
}

.btn-regresar {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background-color: #4c4c68;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
  text-align: center;
  display: block;
  margin: 20px auto;
  width: auto;
}

.btn-regresar:hover {
  background-color: #33334d;
}

h1.elegantshadow {
  text-align: center;
  color: #4c4c68;
  font-size: 2em;
  margin: 30px 0;
}
.filtro-form select {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  min-width: 180px;
  font-size: 15px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.filtro-form select:focus {
  border-color: #4c4c68;
  outline: none;
  box-shadow: 0 0 5px rgba(76, 76, 104, 0.5);
}

.filtro-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
}

@keyframes fadeSlideIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.animar-carga {
  animation: fadeSlideIn 0.6s ease-in-out both;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 20px;
  color: white;
  text-align: center;
  min-width: 90px;
}

.badge-pagado {
  background-color: #4CAF50;
}

.badge-pendiente {
  background-color: #FF9800;
}

.badge-cancelado {
  background-color: #F44336;
}
.kpi-value {
  background-color: #9C27B0;
  color: white;
  display: inline-block;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1.8em;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
@media print {
  body {
      color: #000;
      background: white;
  }

  header, aside, .btn-export, .btn-regresar, .button-container, nav, .crm-sidebar {
      display: none !important;
  }

  .crm-content_ {
      margin: 0 auto;
      padding: 20px;
      width: 100%;
  }

  .dashboard-card {
      page-break-inside: avoid;
      break-inside: avoid;
      border: 1px solid #ccc;
  }

  table.dashboard-table th {
      background-color: #4c4c68 !important;
      -webkit-print-color-adjust: exact;
      color: white;
  }

  .dashboard-table {
      font-size: 12px;
  }

  .dashboard-container {
      grid-template-columns: repeat(2, 1fr);
  }

  .filtro-form, form, .menu-options {
      display: none !important;
  }
}
.print-header {
  display: none;
}

@media print {
  .print-header {
      display: block;
      margin-bottom: 30px;
  }
}
.auth-logo {
  width: 200px;  /* Puedes ajustar a lo que desees */
  height: auto;
  display: block;
  margin: 0 auto 20px auto; /* centrado y separación inferior */
}
.readonly-select {
  background-color: #eee;
  pointer-events: none;
}
.readonly-select {
  background-color: #f5f5f5; /* Fondo gris clarito */
  pointer-events: none;      /* No permite seleccionar */
  border: 1px solid #ccc;     /* Borde suave */
  color: #555;                /* Texto más tenue */
}

.text-link {
  color: #0044cc;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}
.subtitulo-seleccion {
  margin-top: .25rem;
  margin-bottom: .75rem;
  font-weight: 500;
  color: #4b5563; /* gris medio, accesible */
}
.select-corto {
  width: 200px;
}

.select-largo {
  width: 400px;
}

/* Fuerza el tamaño controlado del select de proyecto */
.row-proj-oc #project_id { width: 100% !important; max-width: 560px !important; }
