@import url("https://fonts.google.com/specimen/Roboto?query=roboto");
@import url('./reset.css');
@import url('./sidebar.css');
@import url('./auth-form.css');
@import url('./footer.css');

:root {
  --cyan-50: #E0FCFF;
  --cyan-100: #BEF8FD;
  --cyan-200: #87EAF2;
  --cyan-300: #54D1DB;
  --cyan-400: #38BEC9;
  --cyan-500: #2CB1BC;
  --cyan-600: #14919B;
  --cyan-700: #0E7C86;
  --cyan-800: #0A6C74;
  --cyan-900: #044E54;

  --blue-cyan-700: #003a52;

  --gray-50: #F9FAFC;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D3D6;
  --gray-400: #A0A3A6;
  --gray-500: #717171;
  --gray-600: #525456;
  --gray-700: #3F4144;
  --gray-800: #2D2E30;
  --gray-900: #1A1B1C;

  --white: #FFFFFF;
  --black: #000000;

  --border-gray: #E5E7EB;
  --border-gray-light: #C3C6C9;
  --border-gray-dark: #9B9B9B;
  --border-gray-extra-light: #878787;
  --border-gray-extra-dark: #636363;
  --border-gray-extra-extra-light: #4F4F4F;
  --border-gray-extra-extra-dark: #323232;
  --border-gray-extra-extra-extra-dark: #212121;
  --border-gray-extra-extra-extra-lightest: #1F1F1F;
  --border-gray-extra-extra-extra-lightestest: #0F0F0F;

  --primary: #e8945a;
  --secondary: #F9C23C;
  --success: #34C363;
  --warning: #FFB822;
  --danger: #E74C3C;
  --info: #3498DB;
  --light: #F9F9F9;
  --dark: #343A40;
  --text-muted: #636363;
  --text-primary: #e8945a;
  --brand: #e8945a;
  --brand-dark: #c9753f;
  --text-secondary: #636363;
  --text-light: #FFFFFF;

  --text-dark: #343A40;
  --text-white: #FFFFFF;
  --text-body: #212529;
  --text-lighter: #F8F9FA;

  --fill: #a972cb;
  --pulse: #ef6eae; 
  --close: #ff7f82; 
  --raise: #ffa260; 
  --up: #e4cb58; 
  --slide: #8fc866; 
  --offset: #19bc8b;
}
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}

footer {
  height: 80px;
  max-height: 80px;
  min-height: 80px;
  margin-top: auto;
  display: flex;
  justify-content: center;
  background-color: var(--brand-dark) !important;
  color: #ffffff;
}

input[type="text"] , input[type="password"] , input[type="checkbox"] , input[type="radio"] , input[type="search"] , input[type="date"] , input[type="datetime-local"] , textarea, select  {
  outline: none;
}

.fill:hover,
.fill:focus {
  box-shadow: inset 0 0 0 2em var(--fill);
}

.fill-success {
  transition: all 0.6s !important; /* Transición de 1s para color y box-shadow */
  color:var(--text-primary)
}

.fill-success:hover,
.fill-success:focus {
  box-shadow: inset 0 0 0 2em var(--slide) !important;
  color:#fff !important;
}

.backdrop-overlay::after {
  position: fixed;
  display: inline-block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10;
  content: '';
  pointer-events: auto;
}

/* Sidebar móvil cerrado: no interceptar toques sobre el hamburguesa */
@media (max-width: 1023px) {
  aside#sidebar.-translate-x-full {
    pointer-events: none !important;
  }
  aside#sidebar.sidebar-mobile-open,
  aside#sidebar:not(.-translate-x-full) {
    pointer-events: auto !important;
    z-index: 40 !important;
  }
  #btn_menu_navbar {
    position: relative;
    z-index: 60;
    pointer-events: auto;
  }
  #loadingModal[style*="display: none"],
  #loadingModal[style*="display:none"],
  #initLoadingModal[style*="display: none"],
  #initLoadingModal[style*="display:none"] {
    pointer-events: none !important;
  }
}

.main_container {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 106vh;
  position: relative;
  width: 100%;
  min-width: 320px;
}

.calendar-links .icon-badge {
  background-color: #e94949;
  color: #ffffff;
  font-size: 10px;
  border-radius: 50%;
  padding: 2px;
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(0%,0%);
  width: 15px;
  height: 15px;
  text-align: center;
}

/* Overlay menu */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateX(10px);
  }

  to {
      opacity: 1;
      transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out forwards;
}

/* Modal alert animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideIn {
  from { transform: translateY(-10%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-10%); opacity: 0; }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease forwards;
}

.animate-fadeOut {
  animation: fadeOut 0.3s ease forwards;
}

.animate-slideIn {
  animation: slideIn 0.3s ease forwards;
}

.animate-slideOut {
  animation: slideOut 0.3s ease forwards;
}

/* HTML: <div class="loader"></div> */

.excel-loader {
  border: 2px solid #f3f3f3; /* Light grey */
  border-top: 2px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.loader {
  width: 60px;
  height: 60px;
  margin: 50px auto;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side,#f18a1f 90%,#00000000);
  background: 
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 50%;
  animation: l3 1s infinite linear;
}
@keyframes l3 {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}

@media print {
  @page {
    size: landscape;
  }
  body {
    background-color: white;
  }

  table {
      box-shadow: none;
      margin-bottom: 0;
  }

  table thead

  thead th {
      background-color: #ddd;
      color: black;
      -webkit-print-color-adjust: exact;
  }

  table thead th {
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem; /* Asegura legibilidad en pantallas pequeñas */
    font-weight: 600; /* Negrita para resaltar los encabezados */
    color: #2D3748; /* Color oscuro para contraste */
}

  /* Estilo para el cuerpo de las tablas */
  table tbody td {
      font-family: 'Inter', sans-serif;
      font-size: 0.75rem; /* Tamaño más pequeño pero aún legible */
      font-weight: 400; /* Regular para no sobrecargar la tabla */
      color: #4A5568; /* Color gris para facilitar la lectura */
  }

  tbody tr td.buttons , tbody tr td div.buttons {
    display: none;
  }

  tbody tr td:last-child , tbody tr td div:last-child{
      display:none;
  }

  .badge {
      color: white !important;
      -webkit-print-color-adjust: exact;
  }

  .badge-admin {
      background-color: #007bff !important;
  }

  .badge-tecnico {
      background-color: #17a2b8 !important;
  }

  .badge-gestor {
      background-color: #28a745 !important;
  }

  .toggle {
      display: inline-block;
      width: 20px;
      height: 20px;
      background-color: #007bff !important;
      border-radius: 4px;
      cursor: pointer;
      -webkit-print-color-adjust: exact;
  }

  .action-icons {
      display: none; /* Hide action icons during print */
  }
  body * {
      visibility: hidden;
  }
  #manage_log_sessions_table, #manage_log_sessions_table * {
      visibility: visible;
  }
  #manage_users_table, #manage_users_table * {
    visibility: visible;  
  }
  #manage_warns_table, #manage_warns_table * {
  visibility: visible;
  }
  #manage_log_sessions_table,
  #manage_users_table,
  #manage_warns_table {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
  }
}

/* Datatables */
/* Input and Select Styling */
.dataTable tbody tr td:first-child {
  position: relative;
  
}
.dataTables_wrapper select,
.dataTables_wrapper .dataTables_filter input {
    color: #4a5568; /* text-gray-700 */
    padding: 0.5rem 1rem; /* pl-4, pr-4, pt-2, pb-2 */
    line-height: 1.25; /* leading-tight */
    border-width: 2px; /* border-2 */
    border-radius: 0.25rem; /* rounded */
    border-color: #edf2f7; /* border-gray-200 */
    background-color: #edf2f7; /* bg-gray-200 */
}

/* Row Hover */
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background-color: #ebf4ff; /* bg-indigo-100 */
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
}
/* Pagination Buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-weight: 700; /* font-bold */
    border-radius: 0.25rem; /* rounded */
    border: 1px solid transparent; /* border border-transparent */
    padding: 5px 10px;
    margin: 2px;
    background-color: #f9fafb;
    color: #4a5568;
    margin: 0 5px; /* Add spacing between pagination buttons */
}

.dataTables_wrapper .dataTables_paginate .paginate_button:first-child{
  flex-grow:0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:last-child{
  flex-grow:0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #fff !important; /* text-white */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06); /* shadow */
    background: #667eea !important; /* bg-indigo-500 */
    border: 1px solid transparent; /* border border-transparent */
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: #fff !important; /* text-white */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06); /* shadow */
    background: #667eea !important; /* bg-indigo-500 */
    border: 1px solid transparent; /* border border-transparent */
}

/* Pagination Buttons - Disabled */
.dataTables_paginate .paginate_button.disabled {
    color: #cbd5e0;
    cursor: not-allowed;
}

/* Pagination Arrow Buttons */
.dataTables_paginate .paginate_button.previous, .dataTables_paginate .paginate_button.next {
    font-size: 16px;
}

/* Bottom Border Styling */
table.dataTable.no-footer {
    border-bottom: 1px solid #e2e8f0; /* border-b-1 border-gray-300 */
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Change Colour of Responsive Icon */
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before {
    background-color: #667eea !important; /* bg-indigo-500 */
}

/* Button Styles */
.btn {
    margin-right: 5px;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 4px;
    color: #fff;
    text-align: center;
    display: inline-flex;
    align-items: center;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

/* Radio buttons */
.form-check-input {
  accent-color: #0d6efd; /* Bootstrap primary color */
  width: 1.25rem;
  height: 1.25rem;
}

.form-check-label {
  font-size: 1rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

.title-wrapper {
  flex: 1;
}

#modal_tabla_taaf_incidencias {
  min-height: 300px; /* Ajusta según la altura mínima que desees */
  min-width: 500px;  /* Ajusta según el ancho mínimo que desees */
  max-width: 90%;    /* Para hacerlo responsivo en pantallas pequeñas */
}

#table_incidencias th {
  text-align: center;
}

#table_incidencias tbody tr:nth-child(even) {
  background-color: #ffffff; /* Color claro (bg-gray-100) */
}

#table_incidencias tbody tr:nth-child(odd) {
  background-color: #edf2f7; /* Color más oscuro (bg-gray-200) */
}

#table_incidencias tbody tr:hover {
  background-color: #f9fafb; /* Color oscuro (bg-gray-200) */
}

.truncate {
  max-width: 150px; /* Ajusta según necesites */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wrap-text {
  word-wrap: break-word;
  white-space: normal;
}

/* .button-wrapper {
  display: flex;
  flex-grow: 1 !important;
} */

.search-wrapper {
  flex: 1;
  text-align: right;
}

.search-wrapper input {
  background: white !important;
}

.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dataTables_filter input {
  margin-left: 5px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #ced4da;
}

/* scrollbar — marrón footer interno */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-button {
  width: 0px;
  height: 0px;
}
::-webkit-scrollbar-thumb {
  background: #453536;
  border: 0px none #ffffff;
  border-radius: 50px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5a4543;
}
::-webkit-scrollbar-thumb:active {
  background: #2c2624;
}
::-webkit-scrollbar-track {
  background: #efe7e1;
  border: 0px none #ffffff;
  border-radius: 50px;
}
::-webkit-scrollbar-track:hover {
  background: #e8e0db;
}
::-webkit-scrollbar-track:active {
  background: #e0d6cf;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #453536 #efe7e1;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* Estilo para la lista de paginación */
/* Bootstrap-enhanced pagination styling */
.paginate_button {
  all: unset !important; /* Reset all styles */
}

/* General pagination styles */
.dataTables_wrapper .pagination {
  justify-content: center; /* Center align pagination */
  margin-top: 10px; /* Adjust margin */
  gap:5px;
}

/* Default pagination buttons */
.dataTables_wrapper .pagination li.page-item a {
  color: #555; /* Default text color */
  background-color: #fff; /* Default background */
  border: 1px solid #ddd; /* Add border */
  border-radius: 4px; /* Rounded edges */
  padding: 5px 10px; /* Compact size */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth hover transition */
  cursor:pointer;
}

/* Hover effect */
.dataTables_wrapper .pagination li.page-item a:hover {
  background-color: #f0f0f0 !important; /* Light gray background */
  color: #333 !important; /* Darker text */
  text-decoration: none; /* Remove underline */
  outline: none; /* Remove focus outline */
  box-shadow: none; /* No box shadow */
  cursor: pointer;
}

/* Active button */
.dataTables_wrapper .pagination li.page-item.active a {
  background-color: #007bff !important; /* Bootstrap blue */
  color: #fff !important; /* White text */
  border: 1px solid #007bff !important; /* Blue border */
}

/* Disabled buttons */
.dataTables_wrapper .pagination li.page-item.disabled a {
  color: #aaa !important; /* Gray text */
  background-color: #f9f9f9 !important; /* Light gray background */
  border: 1px solid #ddd !important; /* Light border */
  cursor: not-allowed; /* Indicate non-interactivity */
}

:root {
  --brand-orange: #e8945a;
  --brand-orange-hover: #d9854d;
  --app-navbar-height: 2.75rem;
  --app-sidebar-width: 13rem;
  --brand-dark: #453536;
  --brand-dark-hover: #352728;
}

.btn-brand-orange,
.btn-export-excel,
[id$="_btn_export_to_excel"],
#btn_export_excel {
  background-color: var(--brand-orange) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-brand-orange:hover,
.btn-export-excel:hover,
[id$="_btn_export_to_excel"]:hover,
#btn_export_excel:hover {
  background-color: var(--brand-orange-hover) !important;
  color: #ffffff !important;
}

.btn-brand-dark {
  background-color: var(--brand-dark) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-brand-dark:hover {
  background-color: var(--brand-dark-hover) !important;
  color: #ffffff !important;
}

.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dt-buttons button {
  background-color: var(--brand-orange) !important;
  color: #ffffff !important;
  border: none !important;
}

.dashboard-goals-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  margin: 0.75rem 0 1.25rem 0;
  position: relative;
  z-index: 1;
}

.dashboard-goal-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 4.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.5rem;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  min-width: 0;
  text-decoration: none;
}

.dashboard-goal-box-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dashboard-goal-box-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

a.dashboard-goal-box:hover {
  opacity: 0.95;
  color: #ffffff;
}

@media (max-width: 1200px) {
  .dashboard-goals-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
  }

  .dashboard-goal-box {
    flex: 0 0 9.5rem;
  }
}

.dashboard-goal--blue { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.dashboard-goal--green { background: linear-gradient(90deg, #4ade80, #16a34a); }
.dashboard-goal--red { background: linear-gradient(90deg, #f87171, #dc2626); }
.dashboard-goal--purple { background: linear-gradient(90deg, #c084fc, #9333ea); }
.dashboard-goal--gray { background: linear-gradient(90deg, #9ca3af, #4b5563); }
.dashboard-goal--orange { background: linear-gradient(90deg, #e8945a, #d9854d); }

.admin-deletions-panel {
  border-left-width: 4px;
}

button.btn-brand-dark,
a.btn-brand-dark,
input.btn-brand-dark,
.btn-brand-dark {
  background-color: #453536 !important;
  color: #ffffff !important;
  border: 1px solid #453536 !important;
}

button.btn-brand-dark:hover,
a.btn-brand-dark:hover,
input.btn-brand-dark:hover,
.btn-brand-dark:hover {
  background-color: #352728 !important;
  color: #ffffff !important;
  border-color: #352728 !important;
}

#form_generate_warns_btn_search_contrato,
#form_generate_warns_btn_submit_crear_aviso,
#form_generate_warns_btn_submit_crear_aviso_comercial,
#form_generate_warns_btn_submit_crear_aviso_otros,
#form_manage_users_btn_submit_create_user,
#form_manage_users_btn_submit_update_user,
#btn_submit_change_password,
#btn_submit_generate_password,
#btn_submit_send_password {
  background-color: #453536 !important;
  color: #ffffff !important;
  border: 1px solid #453536 !important;
}

.app-top-navbar {
  height: var(--app-navbar-height);
  min-height: var(--app-navbar-height);
  max-height: var(--app-navbar-height);
  padding-top: 0;
  padding-bottom: 0;
}

.app-top-navbar img#avatar_navbar {
  width: 2rem;
  height: 2rem;
}

.app-top-navbar #btn_manual_pdf,
.app-top-navbar .hidden.md\:block {
  font-size: 0.875rem !important;
  line-height: 1.25rem;
}

.app-layout-main {
  width: 100%;
  min-width: 0;
}

.app-main-content {
  padding-top: calc(var(--app-navbar-height) + 0.75rem);
  padding-left: 0;
  padding-right: 0;
  min-height: calc(100vh - var(--app-navbar-height));
}

@media (min-width: 1024px) {
  .app-main-content {
    margin-left: var(--app-sidebar-width);
    width: calc(100% - var(--app-sidebar-width));
    padding-top: calc(var(--app-navbar-height) + 1rem);
    padding-left: 0.5rem;
  }
}

.app-page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.75rem 1rem 1.5rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .app-page-shell {
    padding: 0.75rem 1.25rem 1.75rem;
  }
}

@media (min-width: 1024px) {
  .app-page-shell {
    padding: 0.75rem 1.25rem 2rem 0.75rem;
  }
}

@media (min-width: 1280px) {
  .app-page-shell {
    padding: 0.75rem 2rem 2rem;
  }
}

/* Todo el contenido ocupa el ancho del área útil */
.app-page-shell > main,
.app-page-shell main,
.app-page-shell > div,
.app-page-shell .w-full {
  box-sizing: border-box;
}

.app-page-card {
  width: 100%;
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1rem;
}

@media (min-width: 768px) {
  .app-page-card {
    padding: 1.25rem 1.5rem;
  }
}

/* Perfil de usuario */
.profile-page {
  width: 100%;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
  .profile-header {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
}

.profile-avatar {
  width: 7rem;
  height: 7rem;
  flex-shrink: 0;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #f3f4f6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.profile-forms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .profile-forms-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.profile-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.profile-sessions-card {
  width: 100%;
  margin-top: 1.5rem;
}

/* Contenedor centrado dentro del área útil (sin tapar sidebar) */
.app-content-centered {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

/* Páginas de avisos, calendario, incidencias: ocupan todo el área útil */
.app-page-full {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.app-sidebar-fixed {
  width: var(--app-sidebar-width);
  max-width: var(--app-sidebar-width);
}

@media (max-width: 1023px) {
  aside#sidebar.app-sidebar-fixed {
    width: min(82vw, 320px) !important;
    max-width: min(82vw, 320px) !important;
  }
}

/* Buscador inteligente de avisos (junto a Guías) */
.navbar-tools {
  max-width: 100%;
}

.navbar-guias-btn {
  white-space: nowrap;
  font-weight: 600;
}

.smart-aviso-search {
  position: relative;
  width: min(320px, 36vw);
  flex-shrink: 1;
  min-width: 140px;
  display: block;
}

.smart-aviso-search-input {
  width: 100%;
  height: 2rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 0.9rem;
  font-size: 0.8rem;
  background: #f9fafb;
  color: #374151;
}

.smart-aviso-search-input:focus {
  outline: none;
  border-color: #e8945a;
  box-shadow: 0 0 0 2px rgba(232, 148, 90, 0.25);
  background: #fff;
}

.smart-aviso-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: auto;
  right: 0;
  width: max(100%, 280px);
  z-index: 50;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
}

.smart-aviso-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  cursor: pointer;
}

.smart-aviso-search-item:hover {
  background: #fff7f0;
}

.smart-aviso-search-item-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1f2937;
}

.smart-aviso-search-item-meta {
  display: block;
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.smart-aviso-search-empty {
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#session-ip-map-panel {
  min-height: 360px;
}

#session-ip-map-panel #session-ip-map-frame {
  height: 360px;
  min-height: 320px;
}

.session-ip-link {
  background: none;
  border: none;
  padding: 0;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.session-ip-link:hover {
  color: #1d4ed8;
}

/* Asistente de ayuda flotante */
.help-bot-root {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
}

.help-bot-fab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 999px;
  background: #e8945a;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(69, 53, 54, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.help-bot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(69, 53, 54, 0.35);
}

.help-bot-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(380px, calc(100vw - 2rem));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  border: 1px solid #f0e6de;
}

.help-bot-panel.hidden {
  display: none;
}

.help-bot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: #453536;
  color: #fff;
}

.help-bot-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  opacity: 0.9;
}

.help-bot-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.help-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #faf8f6;
}

.help-bot-msg {
  max-width: 92%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.help-bot-msg-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #ece7e2;
  color: #374151;
}

.help-bot-msg-user {
  align-self: flex-end;
  background: #e8945a;
  color: #fff;
}

.help-bot-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #eee;
  background: #fff;
}

.help-bot-topic {
  border: 1px solid #e8945a;
  background: #fff7f0;
  color: #453536;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.help-bot-topic:hover {
  background: #ffe8d6;
}

.help-bot-topic-active {
  background: #453536 !important;
  color: #ffffff !important;
  border-color: #453536 !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(69, 53, 54, 0.25);
}

.help-bot-mode-banner {
  padding: 0.45rem 0.75rem;
  background: #fff7f0;
  border-bottom: 1px solid #f0e0d4;
  font-size: 0.75rem;
  color: #453536;
  text-align: center;
}

.help-bot-mode-banner strong {
  color: #e8945a;
}

.help-bot-incidencia-form {
  padding: 0.65rem 0.75rem;
  background: #faf8f6;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.help-bot-form-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #453536;
}

.help-bot-field-label {
  display: block;
  margin: 0.35rem 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.help-bot-field-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.help-bot-field-row-area {
  align-items: flex-start;
}

.help-bot-field-input,
.help-bot-field-textarea,
.help-bot-field-select {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
  font-family: inherit;
  background: #fff;
}

.help-bot-field-textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.help-bot-field-input:focus,
.help-bot-field-textarea:focus,
.help-bot-field-select:focus {
  outline: none;
  border-color: #e8945a;
  box-shadow: 0 0 0 2px rgba(232, 148, 90, 0.2);
}

.help-bot-field-mic {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #e8945a;
  border-radius: 8px;
  background: #fff7f0;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.help-bot-field-mic:hover {
  background: #ffe8d6;
}

.help-bot-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.help-bot-inc-submit {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: #453536;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.help-bot-inc-submit:hover {
  background: #5a4546;
}

.help-bot-input:disabled,
.help-bot-mic:disabled,
.help-bot-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.help-bot-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #eee;
  background: #fff;
}

.help-bot-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
}

.help-bot-input:focus {
  outline: none;
  border-color: #e8945a;
  box-shadow: 0 0 0 2px rgba(232, 148, 90, 0.2);
}

.help-bot-mic,
.help-bot-send {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-bot-mic {
  background: #f3f4f6;
  color: #453536;
}

.help-bot-mic-active {
  background: #fee2e2;
  color: #b91c1c;
  animation: help-bot-pulse 1s infinite;
}

@keyframes help-bot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.help-bot-send {
  background: #453536;
  color: #fff;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.help-bot-result {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #ece7e2;
  border-radius: 8px;
  background: #fff;
  padding: 0.45rem 0.55rem;
  margin-top: 0.35rem;
  cursor: pointer;
}

.help-bot-result:hover {
  background: #fff7f0;
  border-color: #e8945a;
}

.help-bot-result-title {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  color: #1f2937;
}

.help-bot-result-meta {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
}

.help-bot-result-heading {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.help-bot-link {
  color: #e8945a;
  font-weight: 600;
  text-decoration: underline;
}

.help-bot-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fffbf7;
}

.help-bot-hints.hidden {
  display: none;
}

.help-bot-hint {
  border: 1px solid #fed7aa;
  background: #fff;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
}

.help-bot-hint:hover {
  background: #fff7ed;
}

.help-bot-result-action {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #e8945a;
}

@media (max-width: 640px) {
  .help-bot-fab-label {
    display: none;
  }

  .help-bot-fab {
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .help-bot-panel {
    position: fixed;
    right: max(0.5rem, env(safe-area-inset-right));
    left: max(0.5rem, env(safe-area-inset-left));
    bottom: max(4.5rem, calc(4rem + env(safe-area-inset-bottom)));
    width: auto;
    max-height: min(72vh, 520px);
  }

  .help-bot-topics {
    gap: 0.35rem;
  }

  .help-bot-topic {
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }

  .help-bot-input {
    font-size: 16px;
  }
}

/* Responsive: tablas y paneles en móvil (iOS / Android) */
.app-page-shell .dataTables_wrapper,
.app-page-shell .overflow-x-auto,
.app-page-shell table {
  max-width: 100%;
}

@media (max-width: 1023px) {
  .app-main-content {
    width: 100%;
  }

  .app-page-shell {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .admin-deletions-panel {
    padding: 0.875rem !important;
  }

  .btn-export-excel,
  .btn-brand-dark {
    min-height: 44px;
  }
}

/* Modal compartir / generar PDF verificación inmueble */
.share-pdf-modal {
  padding: 1rem;
}

.share-pdf-modal__card {
  background: #fff;
  border: 1px solid #e8e4e1;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(69, 53, 54, 0.18);
  overflow: hidden;
}

.share-pdf-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.share-pdf-modal__close:hover {
  background: #e5e7eb;
  color: #453536;
}

.share-pdf-modal__body {
  padding: 1.5rem 1.35rem 1.35rem;
  text-align: center;
}

.share-pdf-modal__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.share-pdf-modal__logo {
  width: min(200px, 72%);
  height: auto;
  display: block;
  object-fit: contain;
}

.share-pdf-modal__lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
  padding: 0;
  min-width: 0;
  box-shadow: none;
}

.share-pdf-modal__lockup-name {
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #453536;
}

.share-pdf-modal__lockup-tag {
  margin-top: 0.35rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #e89a63;
  white-space: nowrap;
}

.share-pdf-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #453536;
  line-height: 1.3;
}

.share-pdf-modal__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #8a7f7a;
}

.share-pdf-modal__share {
  margin-top: 1.15rem;
}

.share-pdf-modal__share-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.share-pdf-modal__icon-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f3f0;
  color: #453536;
  border: 1px solid #eadfd7;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.share-pdf-modal__icon-btn:hover {
  background: #fff7ed;
  box-shadow: 0 4px 12px rgba(232, 154, 99, 0.25);
  transform: translateY(-1px);
  color: #453536;
}

.share-pdf-modal__icon-btn--wa {
  color: #128c7e;
}

.share-pdf-modal__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  color: #9ca3af;
  font-size: 0.78rem;
  text-transform: lowercase;
}

.share-pdf-modal__divider::before,
.share-pdf-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.share-pdf-modal__link-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.share-pdf-modal__input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  color: #374151;
  background: #fafafa;
  outline: none;
}

.share-pdf-modal__input:focus {
  border-color: #e89a63;
  box-shadow: 0 0 0 3px rgba(232, 154, 99, 0.2);
}

.share-pdf-modal__btn {
  border: none;
  border-radius: 0.65rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.share-pdf-modal__btn:hover {
  filter: brightness(1.05);
}

.share-pdf-modal__btn:active {
  transform: scale(0.99);
}

.share-pdf-modal__btn--pdf {
  background: #e8945a;
  width: 100%;
  margin-top: 0.75rem;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(232, 148, 90, 0.28);
}

.share-pdf-modal__btn--pdf:hover {
  background: #d9783a;
  filter: none;
}

.share-pdf-modal__btn--copy {
  background: #453536;
  width: 100%;
  color: #fff !important;
}

.share-pdf-modal__btn--copy:hover {
  background: #3a2c2d;
}

.share-pdf-modal__email {
  margin-top: 0.75rem;
  text-align: left;
}

@media (min-width: 480px) {
  .share-pdf-modal__link-row {
    flex-direction: row;
    align-items: stretch;
  }

  .share-pdf-modal__btn--copy {
    width: auto;
    flex-shrink: 0;
    min-width: 6.5rem;
  }
}

/* Dictado por voz — campos notas/observaciones checkout */
.ck-voice-host {
  position: relative;
}

.ck-voice-btn {
  position: absolute;
  top: auto;
  bottom: 0.55rem;
  right: 0.55rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid #e8945a;
  border-radius: 0.5rem;
  background: #fff7f0;
  color: #453536;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.ck-voice-btn:hover,
.ck-voice-btn:focus-visible {
  background: #ffe8d6;
  outline: none;
}

.ck-voice-btn--listening {
  background: #e8945a;
  color: #fff;
  border-color: #d17a3e;
  animation: ck-voice-pulse 1.1s ease-in-out infinite;
}

@keyframes ck-voice-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232, 148, 90, 0.45); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(232, 148, 90, 0); }
}

/* Observaciones: mic junto al textarea (debajo del título) */
.ck-voice-host:has(> #text-observaciones-general) .ck-voice-btn {
  right: 1.1rem;
}

/* Espacio para que el texto no quede bajo el mic */
.ck-voice-host > textarea.form-control {
  padding-right: 3rem !important;
}

@media (max-width: 576px) {
  .ck-voice-btn {
    width: 2.6rem;
    height: 2.6rem;
  }
}

