:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #64748b;
  --bg-body: #f1f5f9;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.app-container { display: flex; height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.brand h1 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar { display: flex; flex-direction: column; gap: 0.5rem; }

.navbar button {
  background: transparent;
  color: var(--text-light);
  border: none;
  padding: 1rem;
  text-align: left;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.navbar button:hover, .navbar button.active {
  background: #eff6ff;
  color: var(--primary);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  background: var(--surface);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content-wrapper { padding: 2rem; overflow-y: auto; height: 100%; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

h2, h3 { margin-top: 0; color: var(--text-main); }

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

input, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

input:focus, select:focus {
  border-color: var(--primary);
  outline: none;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

button[type="submit"], .btn-primary { background: var(--primary); color: white; }
button[type="submit"]:hover { background: var(--primary-dark); }

.btn-secundario {
  background: var(--bg-body) !important;
  color: var(--text-light) !important;
  border: 1px solid var(--border) !important;
}

table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table th {
  background: #f8fafc;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 1rem;
  text-align: left;
}
table td { padding: 1rem; border-bottom: 1px solid var(--border); }

.badge { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }

.ventas-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.carrito-panel {
  background: #f8fafc; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between; height: 100%;
}