body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #F5F7FA;
}

.container {
  display: flex;
}

.sidebar {
  width: 240px;
  background: #0B3C6D;
  color: white;
  height: 100vh;
  padding: 20px;
}

.logo {
  width: 100%;
  margin-bottom: 30px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  padding: 12px;
  cursor: pointer;
  border-radius: 6px;
}

.sidebar li:hover {
  background: #1E5FA8;
}

.main {
  flex: 1;
  padding: 30px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

h1, h2 {
  color: #0B3C6D;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

input, select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button {
  margin-top: 20px;
  padding: 12px;
  background: #3CB043;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #2E8B37;
}

.mode {
  grid-column: span 2;
  display: flex;
  gap: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
}
.currency-field {
  display: flex;
  flex-direction: column;
}

.currency-input {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  background: white;
}

.currency-input span {
  margin-right: 8px;
  color: #0B3C6D;
  font-weight: bold;
}

.currency-input input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}
.multi-select {
  position: relative;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px;
  background: white;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.tag {
  background: #1E5FA8;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.tag span {
  cursor: pointer;
  font-weight: bold;
}

.multi-select input {
  border: none;
  outline: none;
  width: 100%;
  padding: 5px;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #ccc;
  background: white;
  display: none;
  z-index: 10;
}

.dropdown div {
  padding: 8px;
  cursor: pointer;
}

.dropdown div:hover {
  background: #f0f0f0;
}

.card h3 {
  font-size: 14px;
  color: #555;
}

.card p {
  font-size: 22px;
  font-weight: bold;
  color: #1f3c5c;
}
#todayTable tr:hover {
  background-color: #f5f7fa;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-left: 6px;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#sales {
  padding: 20px;
}

#sales table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
}

#sales th, #sales td {
  padding: 12px;
  border: 1px solid #ddd;
}

#sales tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
.sales_total {
  font-size: 28px;
  font-weight: bold;
}
.sales-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card h4 {
  margin: 0;
  font-size: 14px;
  color: #555;
}

.card p {
  font-size: 20px;
  font-weight: bold;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.charts-grid canvas {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  height: 260px !important;   /* 🔥 CLAVE */
  width: 100% !important;
}
h2 {
  margin-bottom: 10px;
}

.sales-filter {
  align-items: center;
}

.sales-filter select,
.sales-filter input {
  background: white;
}

.sales-filter button {
  margin-top: 0;
}
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.chart-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);

  display: flex;
  flex-direction: column;

  min-height: 280px;
  overflow: hidden;
}

.chart-card canvas {
  flex:1;
  width: 100% !important;
  height: 100% !important;
}

.chart-body {
  position: relative;
  flex: 1;
  width: 100%;
}

/* TABLET */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-card {
    height: 250px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .sales-filter {
    flex-direction: column;
  }
}
.settings-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.settings-header button {
  background: #0B3C6D;
}

.settings-header button:hover {
  background: #1E5FA8;
}