/* ========== Shadcn/ui-inspired Components ========== */

:root {
  --border-radius: 0.5rem;
  --padding: 0.75rem 1rem;
  --transition: 0.2s ease;
  --bs-primary: #18181b;
  --bs-primary-rgb: #18181b;
  --bs-primary-bg-subtle: #111111;
  --bs-primary-border-subtle: #636363;
  --bs-body-font-size: 14px;
}

body {
  color: #18181b;
  font-family: "Inter", sans-serif;
}

/* Common Styles */
.component {
  border-radius: var(--border-radius);
  padding: var(--padding);
  transition: all var(--transition);
}

/* Common Styles */
.radius {
  border-radius: var(--border-radius);
}

.padding {
  padding: var(--padding);
}

.transition {
  transition: all var(--transition);
}

/* Buttons */
.btn {
  font-weight: 500;
  font-size: 0.8rem;
}

.btn-primary {
  background-color: #18181b;
  color: #fff;
  border: 1px solid #18181b;
}

.btn-primary:hover {
  background-color: #27272a;
  border: 1px solid #27272a;
}

.btn-secondary {
  background-color: #fff;
  color: #18181b;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background-color: #f1f1f1;
  border: 1px solid #f1f1f1;
  color: #18181b;
}

/* Input, Select, Textarea */
.input,
.select,
.textarea {
  width: 100%;
}

.input,
.select,
.textarea {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  color: #000000;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #000000;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  min-width: 10rem;
  padding: 0.5rem 0;
  border-radius: var(--border-radius);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu {
  background-color: #fff;
  border: 1px solid #e5e7eb;
}

/* Label */

label.form-label {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.label.form-label {
  color: #000000;
}

/* Form */
.card {
  padding: var(--padding);
  background-color: #f3f4f6;
  color: #000000;
  border-color: #e5e7eb;
  border-radius: var(--border-radius);
}

.card {
  padding: var(--padding);
  background-color: #27272a;
  color: #ffffff;
  border-color: #27272a;
  border-radius: var(--border-radius);
}

/* Form */
.form {
  padding: var(--padding);
  background-color: #f3f4f6;
  color: #000000;
  border-color: #e5e7eb;
  border-radius: var(--border-radius);
}

.form-control:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #c5c5c5;
  outline: 0;
  box-shadow: none;
}

/* Table */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  padding: var(--padding);
  text-align: left;
}

.table th {
  font-weight: 600;
}

.table {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  text-transform: capitalize;
  min-width: 80px;
}

.badge {
  background-color: #e5e7eb;
  color: #000000;
}

/* Alert */
.alert {
  padding: var(--padding);
  margin-bottom: 1rem;
}

.alert {
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}

/* Error Alert */
.alert-error {
  background-color: #fee2e2;
  border: 1px solid #f87171;
  color: #991b1b;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid;
}

.tab {
  padding: var(--padding);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.tab:hover {
  opacity: 0.8;
}

.tab.active {
  border-bottom-color: currentColor;
}

.tabs {
  border-bottom-color: #e5e7eb;
}

.tab {
  color: #6b7280;
}

.tab.active {
  color: #000000;
}

/* Radio */
.radio {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid;
  border-radius: 50%;
  margin-right: 0.5rem;
  transition: all var(--transition);
}

.radio input[type="radio"]:checked {
  background-color: currentColor;
  border-color: currentColor;
  box-shadow: inset 0 0 0 3px;
}

.radio input[type="radio"] {
  border-color: #6b7280;
}

.radio input[type="radio"]:checked {
  background-color: #000000;
  border-color: #000000;
  box-shadow: inset 0 0 0 3px #fff;
}

/* Modal */

.modal-content {
  max-width: 600px;
  width: 100%;
}

.modal-header,
.modal-body,
.modal-footer {
  padding: var(--padding);
}

.modal-content {
  background-color: #fff;
  color: #000000;
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  flex: 0 0 100%;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 10px;
  text-decoration: none;
}

.carousel-control-prev {
  left: 10px;
}
.carousel-control-next {
  right: 10px;
}

/* Progress Bar */
.progress {
  height: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-t {
  background-color: #e5e7eb;
}

.progress-bar {
  background-color: #3b82f6;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

.tooltip {
  background-color: #000000;
  color: #ffffff;
}

/* Popover */
.popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.popover-content {
  padding: var(--padding);
}

.popover {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  color: #000000;
}

/* Accordion/Collapse */
.accordion {
  border: 1px solid;
}

.accordion-item {
  border-bottom: 1px solid;
}

.accordion-header {
  padding: var(--padding);
  cursor: pointer;
}

.accordion-body {
  padding: var(--padding);
  display: none;
}

.accordion {
  border-color: #e5e7eb;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 0.25rem solid rgba(0, 0, 0, 0.1);
  border-right-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pagination */
.pagination {
  display: flex;
  list-style-type: none;
  padding: 0;
}

.page-item {
  margin: 0 0.25rem;
}

.page-link {
  padding: 0.2rem 0.7rem;
  text-decoration: none;
  border-radius: 6px;
}

.pagination .page-link {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  color: #000000;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  list-style-type: none;
  padding: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 0.5rem;
}

/* List Group */
.list-group {
  list-style-type: none;
  padding: 0;
}

.list-group-item {
  padding: var(--padding);
  border: 1px solid;
}

.list-group .list-group-item {
  background-color: #fff;
  border-color: #e5e7eb;
  color: #000000;
}

.form-login {
  min-width: 390px;
  padding: 3rem;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
}

span#togglePassword {
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 40px;
  opacity: 0.4;
  font-size: 1.3rem;
}

.form-login button[type="submit"] {
  display: block;
  width: 100%;
}

.top-area,
.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

#listadoTable_filter,
#filtros,
#btnCrear {
  margin-bottom: 1rem;
}

.dataTables_info,
div.dataTables_wrapper div.dataTables_length label,
.pagination .page-link {
  font-size: 0.8rem;
}

.paginate_button.previous a,
.paginate_button.next a {
  border: 0;
}

div.dataTables_wrapper div.dataTables_filter input {
  margin-left: 0;
  min-height: 38px;
  min-width: 300px;
}

#filtro-crear {
  flex: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

th.descripcion {
  max-width: 300px;
}

.pagination .page-item.active .page-link {
  background-color: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.usuario-avatar {
  background: #f4f4f4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-right: 1rem;
}

.form-select {
  text-transform: capitalize;
}

.modal-header {
  border: 0;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1rem;
}

.modal-header .btn-close {
  font-size: 0.7rem;
}

.usuario-nombre {
  font-weight: 500;
}

.usuario-datos .btn-link {
  text-decoration: none;
  color: #666;
  font-size: 0.8rem;
}

button#btnCrear {
  min-height: 38px;
  padding-left: 1rem;
  padding-right: 1rem;
}

div.dataTables_wrapper div.dataTables_length select {
  min-height: 38px;
}

.badge.bg-danger {
  background-color: #fbbdc3 !important;
}

.badge.bg-success {
  background-color: rgb(190 233 213) !important;
}

.btn-outline-primary {
  --bs-btn-color: #18181b;
  --bs-btn-border-color: #18181b;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #18181b;
  --bs-btn-hover-border-color: #18181b;
  --bs-btn-focus-shadow-rgb: 13, 110, 253;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #18181b;
  --bs-btn-active-border-color: #0d618181befd;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #018181bd6efd;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #18181b;
  --bs-gradient: none;
}

.form-check-input:checked {
  background-color: #18181b;
  border-color: #18181b;
}

/*
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
  content: "\e5cf"; 
  font-family: "Material Icons";
  font-weight: 300;
  font-style: normal;
  font-size: 24px;
  color: #555;
  background: none;
  box-shadow: none;
  text-align: center;
  line-height: 1.5;
}

table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > td.dtr-control::before {
  content: "\e5ce"; 
}

*/

/* Oculta al inicio */

#miTabla {
  opacity: 0;
  position: relative;
  transition: opacity 0.8s ease; /* aquí seteás el tiempo */
  pointer-events: none;
}

#miTabla.hidden {
}

/* Se muestra con fade */
#miTabla.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Spinner full screen */
.spinner-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

/* Círculo girando (blanco y negro, minimalista) */
.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid black;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.navbar,
.titulo {
  position: relative;
  z-index: 100;
}

.nav-link {
  font-size: 1rem;
}

.container {
  max-width: 1200px;
}

@media (max-width: 768px) {
  div#listadoTable_paginate {
    width: 100%;
    margin-top: 0.5rem;
  }
  .navbar-brand {
    --bs-navbar-brand-font-size: 1rem; /* o el valor que quieras */
  }
}
