body {
  margin: 0;
  font-family: Arial, sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

/* =========================
   LAYOUT BASE
========================= */

.layout {
  display: flex;
  height: 100vh;
}

/* =========================
   SIDEBAR (DESKTOP)
========================= */

.sidebar {
  width: 220px;
  background: #111;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease;
}

.sidebar button {
  background: #222;
  color: white;
  border: 0;
  padding: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: block;
  margin-top: 2px;
  border-radius: 6px;
}

.sidebar button:hover {
  background: #333;
}

/* =========================
   MAIN CONTENT
========================= */

.main {
  flex: 1;
  padding: 20px;
  background: #f5f5f5;
  overflow-y: auto;
}

/* =========================
   MOBILE MENU BUTTON
========================= */

.menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  background: #111;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1001;
}

/* =========================
   OVERLAY (MOBILE)
========================= */

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

/* =========================
   CLIENTES
========================= */

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.client-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.15s ease;
}

.client-card:hover {
  transform: translateY(-2px);
}

.client-detail {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.client-detail p {
  margin: 8px 0;
}

/* =========================
   INFORMES
========================= */

.reports-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.reports-table th {
  background: #1f3a5f;
  color: white;
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

.reports-table th:hover {
	background: #1f3a5f;
}

.reports-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.reports-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.reports-table tbody tr:hover {
  background: #f5f7fa;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-ok {
  background: #dcfce7;
  color: #166534;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-ns {
  background: #e5e7eb;
  color: #4b5563;
}

.report-detail {
  max-width: 1200px;
  margin: 20px auto;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.report-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.sections-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
  gap: 15px;
}

.sections-grid div {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

/* =========================
   RESPONSIVE (MOBILE)
========================= */

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    z-index: 1002;
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: block;
  }


  .main {
    padding-top: 60px;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }
}
/*Botón descarga de informes*/
.report-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}
/*CSS para el dashboard, en panel.html*/
/* =========================
   DASHBOARD MODERNO
========================= */

.dashboard-header {
  margin-bottom: 20px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 28px;
}

.dashboard-header p {
  margin: 5px 0 0;
  color: #666;
}

/* GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

/* CARD */
.dash-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.dash-title {
  font-size: 14px;
  color: #666;
}

.dash-value {
  font-size: 26px;
  font-weight: bold;
  color: #111;
}

/* BOTÓN */
.dash-card button {
  margin-top: auto;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: #111;
  color: white;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease;
}

.dash-card button:hover {
  background: #333;
}

/* LOADING */
.dashboard-loading {
  padding: 20px;
  color: #666;
}
/*Archivo tasks.js*/
/* =========================
   TASKS / TAREAS UI
========================= */

.tasks-header {
  margin-bottom: 20px;
}

.tasks-header h1 {
  margin: 0;
  font-size: 26px;
}

.tasks-header p {
  margin: 5px 0 0;
  color: #666;
}

/* TABLE WRAPPER */
.tasks-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ROW */
.tasks-row {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  align-items: center;
  font-size: 14px;
}

/* HEADER */
.tasks-head {
  background: #111;
  color: white;
  font-weight: bold;
}

/* ALTERNATING GROUP COLORS */
.row-a {
  background: #f7f7f7;
}

.row-b {
  background: #ffffff;
}

/* LABEL DE TAREA */
.task-label {
  font-weight: 600;
  color: #333;
}

/* BOTÓN */
.task-btn {
  background: #111;
  color: white;
  border: none;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s;
}

.task-btn:hover {
  background: #333;
}

/* HOVER ROW */
.tasks-row:hover {
  background: #eef3ff;
}
/*Sobre el archivo tools.js*/
/* =====================================
   TOOLS
===================================== */

.tools-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.tools-header {
  margin-bottom: 25px;
}

.tools-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}

.tools-header p {
  margin-top: 6px;
  color: #666;
}

/* CARD FORMULARIO */

.tools-search-card {
  background: #fff;
  padding: 35px;
  border-radius: 16px;
  border: 1px solid #e6e6e6;
  margin-bottom: 40px;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
}

.tools-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tools-input-group label {
  font-weight: 600;
}

.tools-input-group input {
  padding: 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 15px;
}

.tools-input-group input:focus {
  outline: none;
  border-color: #111;
}

/* RADIO */

.tools-radio-group {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/*Provincias*/
.tools-input-group{
 margin-top: 10px;
}

/* GRID */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* TOOL CARD */

.tool-card {
  background: white;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 32px;
  min-height: 180px;
	justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 3px 12px rgba(0,0,0,.05);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.tool-icon {
  font-size: 42px;
  margin-bottom: 18px;
}

.tool-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tool-desc {
  color: #777;
  font-size: 14px;
}

/* MOBILE */

@media (max-width: 768px) {

  .tools-radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 24px;
}

}
/**botones de cliente** clients.js**/
.btn {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: #2563eb;
  color: white;
  border: none;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: none;
}

.btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.client-header {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.client-card-detail {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.client-grid-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-top: 10px;
}

.client-field {
  font-size: 14px;
}

.client-field strong {
  color: #111827;
}

.btn-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}

.btn-modern {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.btn-edit {
  background: #2563eb;
  color: white;
}

.btn-edit:hover {
  background: #1d4ed8;
}

.btn-delete {
  background: #ef4444;
  color: white;
}

.btn-delete:hover {
  background: #dc2626;
}
/** Estilos para sección Herramientas- 2*/
.tool-result-card {
  margin-top: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
}

.tool-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-item {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
}

.result-item.highlight {
  grid-column: span 2;
  background: #e8f5e9;
}
.filters-bar {
  display:flex;
  gap:10px;
  margin:15px 0;
}

.filters-bar input,
.filters-bar select {
  padding:8px;
  border:1px solid #ddd;
  border-radius:6px;
}

.badge {
  background:#e3f2fd;
  padding:4px 8px;
  border-radius:6px;
  font-size:12px;
}

.badge.secondary {
  background:#f1f1f1;
}

.reports-table tr:hover {
  background:#fafafa;
  cursor:pointer;
}
/**Paginacion**/
.pagination {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin-top:20px;
}

.pagination button {
  padding:6px 10px;
  border:none;
  background:#eee;
  border-radius:6px;
  cursor:pointer;
}

.pagination button:disabled {
  opacity:0.4;
  cursor:not-allowed;
}

th {
  cursor:pointer;
  user-select:none;
}

th:hover {
  background:#f5f5f5;
}
/**Contabilidad**/
.section {
  margin-top: 40px;
}

.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}
.origen-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.origen-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.origen-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.origen-card:hover {
  transform: translateY(-4px);
}

.origen-card.active {
  border: 2px solid #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}
.range-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.range-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
}

.range-btn.active {
  background: #111;
  color: white;
}

.chart-wrapper {
  height: 260px;
  width: 100%;
  position: relative;
}

#incomeChart {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.section h2 {
  margin-bottom: 16px;
}


.clients-list {
  margin-top: 24px; /* 👈 separa visualmente */
}

canvas {
  width: 100% !important;
  height: 100% !important;
}

.filters button,
.sources button {
  margin: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}

.sources button.active {
  background: #007bff;
  color: white;
}