fieldset {
    background:#E9E9E9;
    padding:20px;
}
.form-group {
    margin-bottom:0px !important;
}
.content-wrapper {
    background-color: #ffffff;
}

/* ──── Botón configurar proyecto (engranaje junto al h1) ─────────── */
.btn-proj-config {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0 0 0 .45rem;
  color: #adb5bd;
  cursor: pointer;
  vertical-align: middle;
  opacity: 0.55;
  transition: opacity .15s, color .15s;
  line-height: 1;
}
.btn-proj-config:hover,
.btn-proj-config:focus {
  opacity: 1;
  color: var(--ui-accent, #3b5bdb);
  outline: none;
}
.btn-proj-config svg.lucide {
  width: 1.15rem;
  height: 1.15rem;
}

/* ──── Switch de estado del proyecto ─────────────────────────── */
.proj-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.proj-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.proj-switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--ui-border);
  border-radius: 999px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.proj-switch input:checked ~ .proj-switch-track {
  background: var(--ui-accent);
}
.proj-switch input:disabled ~ .proj-switch-track {
  opacity: 0.5;
}
.proj-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform 0.2s;
}
.proj-switch input:checked ~ .proj-switch-track .proj-switch-thumb {
  transform: translateX(18px);
}
.proj-switch-label {
  font-size: 13.5px;
  color: var(--ui-fg);
}

/* ──── Sidebar light ─────────────────────────────────────── */
.main-sidebar {
  background-color: #f9f9f9 !important;
}
.main-sidebar .brand-link {
  background-color: #f9f9f9 !important;
  border-bottom-color: #e0e0e0 !important;
  color: #111 !important;
}
.main-sidebar .brand-text {
  color: #111 !important;
}
.main-sidebar .sidebar .nav-sidebar .nav-link,
.main-sidebar .sidebar .nav-sidebar .nav-link p {
  color: #111 !important;
}
.main-sidebar .sidebar .nav-sidebar .nav-link .nav-icon,
.main-sidebar .sidebar .nav-sidebar .nav-link svg {
  color: #333 !important;
  fill: none;
}
.main-sidebar .sidebar .nav-sidebar .nav-link:hover,
.main-sidebar .sidebar .nav-sidebar .nav-link:focus {
  background-color: #ebebeb !important;
  color: #000 !important;
}
.main-sidebar .sidebar .nav-sidebar .nav-link.active {
  background-color: #e0e0e0 !important;
  color: #000 !important;
}
.main-sidebar .sidebar .nav-header {
  color: #888 !important;
}
.main-sidebar .sidebar .form-inline {
  padding-top: 12px;
}
.main-sidebar .sidebar .form-inline .input-group .form-control-sidebar {
  background-color: #efefef;
  border-color: #ddd;
  color: #111;
}
.main-sidebar .sidebar .form-inline .input-group .btn-sidebar {
  background-color: #efefef;
  border-color: #ddd;
  color: #333;
}

/* ──── Tipografía global: Inter ─────────────────────────── */
body,
.nav-sidebar .nav-link,
.brand-text,
.content-header,
.main-header,
.card,
th, td,
input, select, textarea, button {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* ──── Sidebar: reducir tamaño de texto y enlaces ───────── */
.main-sidebar .nav-sidebar .nav-link {
  font-size: 13px !important;
  padding: 6px 10px 6px 14px !important;
}
.main-sidebar .nav-sidebar .nav-link p {
  font-size: 13px !important;
  line-height: 1.4 !important;
}
.main-sidebar .brand-link {
  font-size: 14px !important;
  padding: 10px 14px !important;
}
.main-sidebar .brand-text {
  font-size: 14px !important;
}
.main-sidebar .nav-header {
  font-size: 11px !important;
  padding: 4px 10px !important;
}
.Pendiente {
    color:#CCCCCC !important;
}
.Finalizada {
    color:#28a745 !important;
}
.Facturada {
    color:#1e1f21 !important;
}
/* ──── Lucide Icons ──────────────────────────────────────── */
/* Tamaño global: iconos al mismo tamaño que el texto de su contexto */
svg.lucide {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em; /* alineación óptica respecto a la línea base */
  flex-shrink: 0;
}

/* Excepciones por contexto ─────────────────────────────── */

/* Sidebar nav */
.main-sidebar .nav-sidebar .nav-link .nav-icon {
    width: 1.25rem;
    height: 1.25rem;
}
/* Input-group (calendarios, etc.) */
.input-group-text svg.lucide { width: 1rem; height: 1rem; }
/* Dropdown items */
.dropdown-item svg.lucide { width: 1rem; height: 1rem; }
/* Icono de estado (clicable, necesita algo más de área visual) */
table.tk-table td.tk-estado svg.lucide { width: 18px; height: 18px; }
/* Grip: pequeño e invisible, no necesita escalar con texto */
table.tk-table td.reorder-handle svg.lucide { width: 14px; height: 14px; }

/* ──── Asana-style Task Table ────────────────────────────── */

table.tk-table {
  border-collapse: collapse !important;
  border: none !important;
  font-size: 14px;
  color: #1e1f21;
  width: 100%;
  table-layout: fixed;
}

/* Cabecera */
table.tk-table thead th {
  font-size: 11px;
  font-weight: 700;
  color: #6f7782;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none !important;
  border-bottom: 2px solid #e8ecee !important;
  padding: 9px 12px;
  background: #fff;
  white-space: nowrap;
}

/* Filas */
table.tk-table tbody tr {
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
  transition: background 0.1s;
}
table.tk-table tbody tr:hover {
  background-color: #f6f8f9 !important;
}

/* Celdas */
table.tk-table tbody td {
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
  padding: 9px 12px;
  vertical-align: middle;
}

/* Columna grip: aparece solo en hover */
table.tk-table th.reorder-col {
  width: 22px;
  padding: 0 4px;
}
table.tk-table td.reorder-handle {
  width: 22px;
  padding: 0 4px;
  cursor: grab;
  color: #c8cdd3;
  opacity: 0;
  transition: opacity 0.15s;
}
table.tk-table tbody tr:hover td.reorder-handle { opacity: 1; }

/* Estado: botón limpio */
table.tk-table th.tk-col-estado,
table.tk-table td.tk-estado {
  width: 36px;
  white-space: nowrap;
  text-align: center;
}
table.tk-table .botontarea {
  background: none !important;
  border: none !important;
  padding: 0;
  box-shadow: none !important;
  vertical-align: middle;
  line-height: 1;
}
table.tk-table .tk-estado-label {
  font-size: 11px;
  margin-left: 4px;
  vertical-align: middle;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Nombre de tarea */
table.tk-table td.tk-task-name,
table.tk-table th.tk-task-name {
  width: 25%;
}
table.tk-table td.tk-task-name {
  font-size: 14px;
  font-weight: 500;
}
table.tk-table td.tk-task-name a {
  color: #1e1f21;
  text-decoration: none;
}
table.tk-table td.tk-task-name a:hover { color: #0052cc; text-decoration: underline; }

/* Notas: truncar con ellipsis */
table.tk-table td.tk-notas,
table.tk-table th.tk-notas {
  width: 25%;
  overflow: hidden;
}
table.tk-table td.tk-notas {
  color: #6f7782;
  font-size: 14px;
}
table.tk-table td.tk-notas span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fecha y Horas */
table.tk-table td.tk-meta,
table.tk-table th.tk-meta {
  white-space: nowrap;
  width: 85px;
}
table.tk-table td.tk-meta {
  color: #6f7782;
  font-size: 14px;
}

/* Facturable: centrado */
table.tk-table th.tk-col-facturable,
table.tk-table td.tk-facturable {
  text-align: center;
  width: 50px;
}

/* Acciones: visibles al 20% por defecto, 100% en hover */
table.tk-table td.tk-acciones {
  white-space: nowrap;
  width: 55px;
  opacity: 0.2;
  transition: opacity 0.15s;
}
table.tk-table tbody tr:hover td.tk-acciones { opacity: 1; }
table.tk-table td.tk-acciones a {
  color: #6f7782;
  padding: 4px 5px;
  display: inline-block;
  border-radius: 4px;
  text-decoration: none;
}
table.tk-table td.tk-acciones a:hover {
  color: #1e1f21;
  background: #e8ecee;
}

/* ──── DataTables toolbar: quitar borde extra que deja DT */
#tabla1_wrapper .dataTables_scrollHead table { border-bottom: none; }

/* ──── DataTables Buttons: barra de exportación ─────────── */
#tabla1_wrapper .dt-buttons {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
#tabla1_wrapper .dt-buttons.dt-buttons-visible {
  display: flex;
}
#tabla1_wrapper .dt-buttons .btn {
  font-size: 13px;
}
/* ──── Tempus Dominus: botones prev/next sin FontAwesome ─── */
.bootstrap-datetimepicker-widget .fa-chevron-left::before  { content: '‹'; font-style: normal; font-size: 16px; line-height: 1; }
.bootstrap-datetimepicker-widget .fa-chevron-right::before { content: '›'; font-style: normal; font-size: 16px; line-height: 1; }
.bootstrap-datetimepicker-widget .fa-chevron-up::before    { content: '︿'; font-style: normal; font-size: 14px; line-height: 1; }
.bootstrap-datetimepicker-widget .fa-chevron-down::before  { content: '﹀'; font-style: normal; font-size: 14px; line-height: 1; }
.bootstrap-datetimepicker-widget .fa-clock-o::before,
.bootstrap-datetimepicker-widget .fa-clock::before         { content: '⏱'; font-style: normal; }
.bootstrap-datetimepicker-widget .fa-calendar::before      { content: '📅'; font-style: normal; }
.bootstrap-datetimepicker-widget .fa-trash::before         { content: '✕'; font-style: normal; }
.bootstrap-datetimepicker-widget .fa-times::before         { content: '✕'; font-style: normal; }

/* ──── DataTables paginación: igualar tamaño de fuente ───── */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  font-size: 13px !important;
  padding: .25rem .5rem !important;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info {
  font-size: 13px;
}

/* ──── Filas separador de sección ────────────────────────── */
table.tk-table tr.tk-separator-row {
  background: #f0f2f5 !important;
  border-top: 2px solid #d8dce3 !important;
}
table.tk-table tr.tk-separator-row td {
  border-bottom: 1px solid #d8dce3 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
table.tk-table tr.tk-separator-row td.tk-separator-title {
  /* celdas vacías que ocultan su fondo */
  background: #f0f2f5;
}
table.tk-table tr.tk-separator-row td.tk-separator-label {
  font-size: 11px;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
table.tk-table tr.tk-separator-row td.tk-separator-actions {
  opacity: 0.2;
  transition: opacity 0.15s;
}
table.tk-table tr.tk-separator-row:hover td.tk-separator-actions {
  opacity: 1;
}

/* ──── Filas facturadas: texto muted ─────────────────────── */
table.tk-table tr.tk-facturada td {
  color: #adb5bd;
}
table.tk-table tr.tk-facturada td a {
  color: #adb5bd;
}

/* ──── Tabla de resultados de búsqueda ───────────────────── */
table.tk-search-results th.tk-search-proyecto,
table.tk-search-results td.tk-search-proyecto {
  width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.tk-search-results th.tk-search-acciones,
table.tk-search-results td.tk-search-acciones {
  width: 64px;
  white-space: nowrap;
}

/* ──── Leyenda de estados ─────────────────────────────────── */
.tk-legend {
  display: flex;
  gap: 18px;
  padding: 8px 4px 0;
  flex-wrap: wrap;
}
.tk-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #6f7782;
}

/* ════════════════════════════════════════════════════════════
   SaaS UI — Botones, radios, checks, filtros
   ════════════════════════════════════════════════════════════ */

/* ── Variables de paleta neutral ───────────────────────────── */
:root {
  --ui-fg:        #1e1f21;
  --ui-fg-soft:   #6f7782;
  --ui-border:    #d0d5dd;
  --ui-bg:        #ffffff;
  --ui-bg-hover:  #f5f7f9;
  --ui-accent:    #3b5bdb;       /* azul índigo sobrio */
  --ui-accent-h:  #2f4ac9;
  --ui-accent-bg: #eef1fd;
  --ui-danger:    #e03131;
  --ui-danger-bg: #fff5f5;
  --ui-radius:    6px;
  --ui-font-sm:   13px;
}

/* ── Reset general en botones Bootstrap ─────────────────────── */
.btn {
  font-size: var(--ui-font-sm) !important;
  font-weight: 500 !important;
  border-radius: var(--ui-radius) !important;
  padding: 6px 14px !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
}

/* ── Botón primario ─────────────────────────────────────────── */
.btn-primary {
  background: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--ui-accent-h) !important;
  border-color: var(--ui-accent-h) !important;
}

/* ── Botón secundario / default ─────────────────────────────── */
.btn-secondary, .btn-default {
  background: var(--ui-bg) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-fg) !important;
}
.btn-secondary:hover, .btn-secondary:focus,
.btn-default:hover,   .btn-default:focus {
  background: var(--ui-bg-hover) !important;
  border-color: #b0b8c4 !important;
  color: var(--ui-fg) !important;
}

/* ── Botón peligro ──────────────────────────────────────────── */
.btn-danger {
  background: var(--ui-bg) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-danger) !important;
}
.btn-danger:hover, .btn-danger:focus {
  background: var(--ui-danger-bg) !important;
  border-color: var(--ui-danger) !important;
}

/* ── Botones con color fuerte (success/warning/info) → neutros ─ */
.btn-success,
.btn-warning,
.btn-info {
  background: var(--ui-bg) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-fg) !important;
}
.btn-success:hover, .btn-success:focus,
.btn-warning:hover, .btn-warning:focus,
.btn-info:hover,    .btn-info:focus {
  background: var(--ui-bg-hover) !important;
  border-color: #b0b8c4 !important;
  color: var(--ui-fg) !important;
}

/* ── Botón outline (para filtros btn-group) ─────────────────── */
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-warning {
  background: var(--ui-bg) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-fg-soft) !important;
  font-size: var(--ui-font-sm) !important;
}
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-warning:hover {
  background: var(--ui-bg-hover) !important;
  color: var(--ui-fg) !important;
  border-color: #b0b8c4 !important;
}
.btn-outline-secondary.active,
.btn-outline-success.active,
.btn-outline-warning.active {
  background: var(--ui-accent-bg) !important;
  border-color: var(--ui-accent) !important;
  color: var(--ui-accent) !important;
  font-weight: 600 !important;
}

/* ── btn-group: quitar duplicado de bordes entre botones ──────── */
.btn-group > .btn:not(:first-child) { margin-left: -1px !important; }
.btn-group > .btn:first-child       { border-radius: var(--ui-radius) 0 0 var(--ui-radius) !important; }
.btn-group > .btn:last-child        { border-radius: 0 var(--ui-radius) var(--ui-radius) 0 !important; }
.btn-group > .btn:only-child        { border-radius: var(--ui-radius) !important; }

/* ── Radio buttons y checkboxes custom ───────────────────────── */
.form-check-input[type="radio"],
.form-check-input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ui-border);
  border-radius: 50%;
  background: var(--ui-bg);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-top: 2px;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.form-check-input[type="checkbox"] { border-radius: 4px; }

.form-check-input[type="radio"]:checked,
.form-check-input[type="checkbox"]:checked {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
}
.form-check-input[type="radio"]:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.form-check-input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}
.form-check-input[type="radio"]:hover,
.form-check-input[type="checkbox"]:hover {
  border-color: var(--ui-accent);
}
.form-check-label {
  font-size: var(--ui-font-sm);
  color: var(--ui-fg);
  cursor: pointer;
  margin-left: 5px;
}

/* ── Separadores verticales entre grupos de botones ──────────── */
.border-left { border-left: 1px solid var(--ui-border) !important; }

/* ════════════════════════════════════════════════════════════
   Color primario — unificación de componentes Bootstrap
   Sustituye el #007bff estándar por --ui-accent (#3b5bdb)
   ════════════════════════════════════════════════════════════ */

/* Paginación (DataTables usa .paginate_button.current) */
.page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
  color: #fff !important;
}
.page-link {
  color: var(--ui-accent);
}
.page-link:hover {
  color: var(--ui-accent-h);
}
.page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(59,91,219,.25);
}

/* Links globales */
a { color: var(--ui-accent); }
a:hover { color: var(--ui-accent-h); }

/* Focus ring global */
*:focus {
  outline-color: var(--ui-accent);
  box-shadow: 0 0 0 0.2rem rgba(59,91,219,.25);
}

/* Badges */
.badge-primary {
  background-color: var(--ui-accent) !important;
}

/* Alerts */
.alert-primary {
  background-color: var(--ui-accent-bg) !important;
  border-color: var(--ui-accent) !important;
  color: var(--ui-accent-h) !important;
}

/* Progress bars */
.progress-bar { background-color: var(--ui-accent) !important; }

/* Nav pills / tabs activos */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--ui-accent) !important;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: var(--ui-accent) !important;
  border-bottom-color: var(--ui-accent) !important;
}
