/* ========================================
   ESTILOS PARA MÓDULO DE CUENTAS CONTABLES
   ======================================== */

/* Responsividad mejorada */
@media (max-width: 768px) {
  .table-responsive {
    border: none;
  }
  
  .btn-group-vertical {
    display: block;
  }
  
  .btn-group-vertical .btn {
    margin-bottom: 2px;
    width: 100%;
  }
  
  .box-tools .btn {
    margin-bottom: 5px;
  }
}

@media (max-width: 480px) {
  .content-header h1 {
    font-size: 18px;
  }
  
  .content-header h1 small {
    display: block;
    margin-top: 5px;
  }
  
  .box-body .row .col-md-3,
  .box-body .row .col-md-4,
  .box-body .row .col-md-6,
  .box-body .row .col-md-8 {
    margin-bottom: 10px;
  }
}

/* Estilos para la tabla */
.tablas {
  font-size: 13px;
}

.tablas th {
  background-color: #f4f4f4;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}

.tablas td {
  vertical-align: middle;
}

/* Indicadores visuales */
.text-green { color: #00a65a !important; }
.text-red { color: #dd4b39 !important; }
.text-blue { color: #3c8dbc !important; }
.text-orange { color: #f39c12 !important; }
.text-purple { color: #605ca8 !important; }

/* Badges personalizados */
.badge-info {
  background-color: #3c8dbc;
}

.badge-primary {
  background-color: #3c8dbc;
}

.badge-warning {
  background-color: #f39c12;
}

.badge-success {
  background-color: #00a65a;
}

.badge-danger {
  background-color: #dd4b39;
}

.badge-default {
  background-color: #777;
}

/* Labels personalizados */
.label-primary {
  background-color: #3c8dbc;
}

.label-warning {
  background-color: #f39c12;
}

.label-success {
  background-color: #00a65a;
}

.label-danger {
  background-color: #dd4b39;
}

.label-info {
  background-color: #00c0ef;
}

.label-default {
  background-color: #777;
}

/* Árbol de jerarquía */
.tree {
  list-style: none;
  padding-left: 0;
}

.tree li {
  margin: 5px 0;
  padding: 5px;
  border-left: 2px solid #ddd;
  margin-left: 10px;
}

.tree li.tipo-activo {
  border-left-color: #3c8dbc;
}

.tree li.tipo-pasivo {
  border-left-color: #f39c12;
}

.tree li.tipo-capital {
  border-left-color: #00c0ef;
}

.tree li.tipo-ingreso {
  border-left-color: #00a65a;
}

.tree li.tipo-gasto {
  border-left-color: #dd4b39;
}

.tree li.tipo-financiero {
  border-left-color: #777;
}

/* Filtros responsivos */
@media (max-width: 768px) {
  .filtros .col-md-3 {
    margin-bottom: 15px;
  }
  
  .filtros .btn {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* Modales responsivos */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 10px;
    width: calc(100% - 20px);
  }
  
  .modal-body .row .col-md-6 {
    margin-bottom: 20px;
  }
}

/* Botones de acción */
.btn-group-vertical .btn {
  margin-bottom: 2px;
  border-radius: 3px;
}

.btn-group-vertical .btn:last-child {
  margin-bottom: 0;
}

/* Indicadores en la tabla */
.tablas td small {
  font-size: 11px;
}

.tablas td i {
  margin-right: 3px;
}

/* Animaciones suaves */
.btn, .modal, .table {
  transition: all 0.3s ease;
}

/* Estilos para DataTables responsivo */
.dt-responsive .dtr-details {
  width: 100%;
}

.dt-responsive .dtr-details li {
  border-bottom: 1px solid #efefef;
  padding: 0.5em 0;
}

.dt-responsive .dtr-details li:last-child {
  border-bottom: none;
}

.dt-responsive .dtr-title {
  font-weight: bold;
  width: 40%;
}

.dt-responsive .dtr-data {
  width: 60%;
}

/* Estilos para el breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb > li + li:before {
  content: "›";
  color: #ccc;
}

/* Estilos para los filtros */
.box-primary .box-header {
  background: linear-gradient(135deg, #3c8dbc 0%, #2c6aa0 100%);
  color: white;
}

.box-primary .box-header h3 {
  color: white;
}

/* Estilos para la tabla de detalles */
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

.table-striped > tbody > tr:hover {
  background-color: #f5f5f5;
}

/* Estilos para los modales */
.modal-header.bg-info {
  background: linear-gradient(135deg, #00c0ef 0%, #00a7d0 100%);
  color: white;
}

.modal-header.bg-info .modal-title {
  color: white;
}

.modal-header.bg-info .close {
  color: white;
  opacity: 0.8;
}

.modal-header.bg-info .close:hover {
  opacity: 1;
}

/* Estilos para los tooltips */
.tooltip {
  font-size: 12px;
}

.tooltip-inner {
  background-color: #333;
  color: white;
  border-radius: 4px;
  padding: 5px 10px;
}

/* Estilos para los alerts */
.alert {
  border-radius: 4px;
  border: none;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

/* Estilos para los formularios */
.form-control:focus {
  border-color: #3c8dbc;
  box-shadow: 0 0 0 0.2rem rgba(60, 141, 188, 0.25);
}

.input-group-addon {
  background-color: #f4f4f4;
  border-color: #d2d6de;
  color: #555;
}

/* Estilos para los checkboxes */
.checkbox label {
  font-weight: normal;
  margin-bottom: 0;
}

.checkbox input[type="checkbox"] {
  margin-right: 5px;
}

/* Estilos para los selects */
select.form-control {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 8px 10px;
  padding-right: 2rem;
}

/* Estilos para la paginación */
.dataTables_paginate .paginate_button {
  padding: 0.375rem 0.75rem;
  margin-left: 2px;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  color: #007bff;
  text-decoration: none;
  background-color: #fff;
}

.dataTables_paginate .paginate_button:hover {
  color: #0056b3;
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.dataTables_paginate .paginate_button.current {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

/* Estilos para la búsqueda */
.dataTables_filter input {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
}

.dataTables_filter input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos para el loading */
.dataTables_processing {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  margin-left: -100px;
  margin-top: -26px;
  text-align: center;
  padding: 1em 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para la información de la tabla */
.dataTables_info {
  padding-top: 0.755em;
  white-space: nowrap;
  color: #666;
}

/* Estilos para el selector de longitud */
.dataTables_length select {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
}

/* Estilos para el contenedor de la tabla */
.dataTables_wrapper {
  position: relative;
  clear: both;
  zoom: 1;
}

.dataTables_wrapper .dataTables_length {
  float: left;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
  text-align: right;
}

.dataTables_wrapper .dataTables_info {
  clear: both;
  float: left;
  padding-top: 0.755em;
}

.dataTables_wrapper .dataTables_paginate {
  float: right;
  text-align: right;
  padding-top: 0.25em;
}

/* Estilos para el contenedor de la tabla en dispositivos móviles */
@media screen and (max-width: 767px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    text-align: center;
  }
  
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none;
    clear: both;
  }
  
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none;
    clear: both;
  }
}

