:root {
  --primary: #2c3e50;
  --accent: #3498db;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #333;
  --text-muted: #666;
  --success: #27ae60;
  --border: #e1e4e8;
  --live: #e74c3c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px; /* Base pequeña */
}

.app-header {
  background: var(--primary);
  color: white;
  padding: 15px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.app-header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.container {
  padding: 10px;
  max-width: 600px; /* Limite para tablets/pc */
  margin: 0 auto;
}

.section-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 15px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-live { color: var(--live); }
.text-primary { color: var(--accent); }

.date-badge {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* --- ESTILO DE TARJETAS (CARDS) --- */
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.business-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  border: 1px solid var(--border);
}

.card-header {
  background: #f8f9fa;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 0;
}

/* Filas de vendedores */
.vendedor-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.vendedor-row:last-child {
  border-bottom: none;
}

.v-name {
  color: var(--text);
}
.v-name i {
  color: #bdc3c7;
  margin-right: 5px;
  font-size: 0.8rem;
}

.v-total {
  font-weight: 600;
  color: var(--primary);
}

.card-footer {
  background: #fff;
  padding: 10px 12px;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--success);
}

/* --- CONTROLES DE FECHA --- */
.search-controls {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 0.9rem;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary:active {
  background: #1a252f;
}

.loading-spinner, .empty-state {
  text-align: center;
  padding: 20px;
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
}

.divider {
  border: 0;
  height: 1px;
  background: #e1e4e8;
  margin: 25px 0;
}